Skip to content

Commit 869e386

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: switch to drm_dbg_kms() from DRM_DEBUG_KMS
DRM_DEBUG_ class of macros are depricated. Recommended drm_dbg_kms() has the advantage of being able to distinguish the logs from devices in a multi-gpu environment. Where a pointer to struct amdgpu_device is available, use that to get the drm device. Reviewed-by: Sun peng (Leo) Li <sunpeng.li@amd.com> Signed-off-by: Aurabindo Pillai <aurabindo.pillai@amd.com> Signed-off-by: Matthew Stewart <matthew.stewart2@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
1 parent e9306b6 commit 869e386

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1137,7 +1137,7 @@ static int amdgpu_dm_audio_component_get_eld(struct device *kdev, int port,
11371137

11381138
mutex_unlock(&adev->dm.audio_lock);
11391139

1140-
DRM_DEBUG_KMS("Get ELD : idx=%d ret=%d en=%d\n", port, ret, *enabled);
1140+
drm_dbg_kms(adev_to_drm(adev), "Get ELD : idx=%d ret=%d en=%d\n", port, ret, *enabled);
11411141

11421142
return ret;
11431143
}
@@ -1231,7 +1231,7 @@ static void amdgpu_dm_audio_eld_notify(struct amdgpu_device *adev, int pin)
12311231
struct drm_audio_component *acomp = adev->dm.audio_component;
12321232

12331233
if (acomp && acomp->audio_ops && acomp->audio_ops->pin_eld_notify) {
1234-
DRM_DEBUG_KMS("Notify ELD: %d\n", pin);
1234+
drm_dbg_kms(adev_to_drm(adev), "Notify ELD: %d\n", pin);
12351235

12361236
acomp->audio_ops->pin_eld_notify(acomp->audio_ops->audio_ptr,
12371237
pin, -1);
@@ -2377,15 +2377,15 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
23772377
}
23782378

23792379
if (adev->firmware.load_type != AMDGPU_FW_LOAD_PSP) {
2380-
DRM_DEBUG_KMS("dm: DMCU firmware not supported on direct or SMU loading\n");
2380+
drm_dbg_kms(adev_to_drm(adev), "dm: DMCU firmware not supported on direct or SMU loading\n");
23812381
return 0;
23822382
}
23832383

23842384
r = amdgpu_ucode_request(adev, &adev->dm.fw_dmcu, AMDGPU_UCODE_REQUIRED,
23852385
"%s", fw_name_dmcu);
23862386
if (r == -ENODEV) {
23872387
/* DMCU firmware is not necessary, so don't raise a fuss if it's missing */
2388-
DRM_DEBUG_KMS("dm: DMCU firmware not found\n");
2388+
drm_dbg_kms(adev_to_drm(adev), "dm: DMCU firmware not found\n");
23892389
adev->dm.fw_dmcu = NULL;
23902390
return 0;
23912391
}
@@ -2409,7 +2409,7 @@ static int load_dmcu_fw(struct amdgpu_device *adev)
24092409

24102410
adev->dm.dmcu_fw_version = le32_to_cpu(hdr->header.ucode_version);
24112411

2412-
DRM_DEBUG_KMS("PSP loading DMCU firmware\n");
2412+
drm_dbg_kms(adev_to_drm(adev), "PSP loading DMCU firmware\n");
24132413

24142414
return 0;
24152415
}
@@ -4157,7 +4157,7 @@ static void schedule_hpd_rx_offload_work(struct amdgpu_device *adev, struct hpd_
41574157
offload_work->adev = adev;
41584158

41594159
queue_work(offload_wq->wq, &offload_work->work);
4160-
DRM_DEBUG_KMS("queue work to handle hpd_rx offload work");
4160+
drm_dbg_kms(adev_to_drm(adev), "queue work to handle hpd_rx offload work");
41614161
}
41624162

41634163
static void handle_hpd_rx_irq(void *param)
@@ -4986,7 +4986,7 @@ static void amdgpu_dm_update_backlight_caps(struct amdgpu_display_manager *dm,
49864986
caps->min_input_signal < 0 ||
49874987
spread > AMDGPU_DM_DEFAULT_MAX_BACKLIGHT ||
49884988
spread < AMDGPU_DM_MIN_SPREAD) {
4989-
DRM_DEBUG_KMS("DM: Invalid backlight caps: min=%d, max=%d\n",
4989+
drm_dbg_kms(adev_to_drm(dm->adev), "DM: Invalid backlight caps: min=%d, max=%d\n",
49904990
caps->min_input_signal, caps->max_input_signal);
49914991
caps->caps_valid = false;
49924992
}
@@ -5515,7 +5515,7 @@ static int amdgpu_dm_initialize_drm_device(struct amdgpu_device *adev)
55155515
}
55165516
break;
55175517
default:
5518-
DRM_DEBUG_KMS("Unsupported DCN IP version for outbox: 0x%X\n",
5518+
drm_dbg_kms(adev_to_drm(adev), "Unsupported DCN IP version for outbox: 0x%X\n",
55195519
amdgpu_ip_version(adev, DCE_HWIP, 0));
55205520
}
55215521

@@ -9628,7 +9628,7 @@ static void update_freesync_state_on_stream(
96289628
new_stream->allow_freesync = mod_freesync_get_freesync_enabled(&vrr_params);
96299629

96309630
if (new_crtc_state->freesync_vrr_info_changed)
9631-
DRM_DEBUG_KMS("VRR packet update: crtc=%u enabled=%d state=%d",
9631+
drm_dbg_kms(adev_to_drm(adev), "VRR packet update: crtc=%u enabled=%d state=%d",
96329632
new_crtc_state->base.crtc->base.id,
96339633
(int)new_crtc_state->base.vrr_enabled,
96349634
(int)vrr_params.state);
@@ -11574,7 +11574,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
1157411574

1157511575
dc_stream_retain(new_stream);
1157611576

11577-
DRM_DEBUG_ATOMIC("Enabling DRM crtc: %d\n",
11577+
drm_dbg_atomic(adev_to_drm(adev), "Enabling DRM crtc: %d\n",
1157811578
crtc->base.id);
1157911579

1158011580
if (dc_state_add_stream(
@@ -11804,22 +11804,22 @@ static int dm_check_cursor_fb(struct amdgpu_crtc *new_acrtc,
1180411804

1180511805
if (fb->width > new_acrtc->max_cursor_width ||
1180611806
fb->height > new_acrtc->max_cursor_height) {
11807-
DRM_DEBUG_ATOMIC("Bad cursor FB size %dx%d\n",
11807+
drm_dbg_atomic(adev_to_drm(adev), "Bad cursor FB size %dx%d\n",
1180811808
new_plane_state->fb->width,
1180911809
new_plane_state->fb->height);
1181011810
return -EINVAL;
1181111811
}
1181211812
if (new_plane_state->src_w != fb->width << 16 ||
1181311813
new_plane_state->src_h != fb->height << 16) {
11814-
DRM_DEBUG_ATOMIC("Cropping not supported for cursor plane\n");
11814+
drm_dbg_atomic(adev_to_drm(adev), "Cropping not supported for cursor plane\n");
1181511815
return -EINVAL;
1181611816
}
1181711817

1181811818
/* Pitch in pixels */
1181911819
pitch = fb->pitches[0] / fb->format->cpp[0];
1182011820

1182111821
if (fb->width != pitch) {
11822-
DRM_DEBUG_ATOMIC("Cursor FB width %d doesn't match pitch %d",
11822+
drm_dbg_atomic(adev_to_drm(adev), "Cursor FB width %d doesn't match pitch %d",
1182311823
fb->width, pitch);
1182411824
return -EINVAL;
1182511825
}
@@ -11831,7 +11831,7 @@ static int dm_check_cursor_fb(struct amdgpu_crtc *new_acrtc,
1183111831
/* FB pitch is supported by cursor plane */
1183211832
break;
1183311833
default:
11834-
DRM_DEBUG_ATOMIC("Bad cursor FB pitch %d px\n", pitch);
11834+
drm_dbg_atomic(adev_to_drm(adev), "Bad cursor FB pitch %d px\n", pitch);
1183511835
return -EINVAL;
1183611836
}
1183711837

@@ -11849,7 +11849,7 @@ static int dm_check_cursor_fb(struct amdgpu_crtc *new_acrtc,
1184911849
AMDGPU_TILING_GET(afb->tiling_flags, MICRO_TILE_MODE) == 0;
1185011850
}
1185111851
if (!linear) {
11852-
DRM_DEBUG_ATOMIC("Cursor FB not linear");
11852+
drm_dbg_atomic(adev_to_drm(adev), "Cursor FB not linear");
1185311853
return -EINVAL;
1185411854
}
1185511855
}

0 commit comments

Comments
 (0)