* [PATCH] drm/amd/display: Use DRM_DEBUG_DP
@ 2021-03-23 0:31 Luben Tuikov
2021-03-23 14:26 ` Alex Deucher
0 siblings, 1 reply; 6+ messages in thread
From: Luben Tuikov @ 2021-03-23 0:31 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Luben Tuikov, Harry Wentland
Convert IRQ-based prints from DRM_DEBUG_DRIVER to
DRM_DEBUG_DP, as the latter is not used in drm/amd
prior to this patch and since IRQ-based prints
drown out the rest of the driver's
DRM_DEBUG_DRIVER messages.
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 +++++++++----------
1 file changed, 33 insertions(+), 34 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f455fc3aa561..aabaa652f6dc 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
- DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
- amdgpu_crtc->crtc_id, amdgpu_crtc,
- vrr_active, (int) !e);
+ DRM_DEBUG_DP("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
+ amdgpu_crtc->crtc_id, amdgpu_crtc,
+ vrr_active, (int) !e);
}
static void dm_vupdate_high_irq(void *interrupt_params)
@@ -993,8 +993,7 @@ static void event_mall_stutter(struct work_struct *work)
dc_allow_idle_optimizations(
dm->dc, dm->active_vblank_irq_count == 0);
- DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
-
+ DRM_DEBUG_DP("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
mutex_unlock(&dm->dc_lock);
}
@@ -1810,8 +1809,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
if (acrtc && state->stream_status[i].plane_count != 0) {
irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
if (rc)
DRM_WARN("Failed to %s pflip interrupts\n",
enable ? "enable" : "disable");
@@ -4966,8 +4965,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
stream->src = src;
stream->dst = dst;
- DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
- dst.x, dst.y, dst.width, dst.height);
+ DRM_DEBUG_DP("Destination Rectangle x:%d y:%d width:%d height:%d\n",
+ dst.x, dst.y, dst.width, dst.height);
}
@@ -5710,8 +5709,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
return rc;
}
@@ -6664,7 +6663,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
int r;
if (!new_state->fb) {
- DRM_DEBUG_DRIVER("No FB bound\n");
+ DRM_DEBUG_DP("No FB bound\n");
return 0;
}
@@ -7896,11 +7895,11 @@ static void handle_cursor_update(struct drm_plane *plane,
if (!plane->state->fb && !old_plane_state->fb)
return;
- DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
- __func__,
- amdgpu_crtc->crtc_id,
- plane->state->crtc_w,
- plane->state->crtc_h);
+ DRM_DEBUG_DP("%s: crtc_id=%d with size %d to %d\n",
+ __func__,
+ amdgpu_crtc->crtc_id,
+ plane->state->crtc_w,
+ plane->state->crtc_h);
ret = get_cursor_position(plane, crtc, &position);
if (ret)
@@ -7958,8 +7957,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
/* Mark this event as consumed */
acrtc->base.state->event = NULL;
- DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
- acrtc->crtc_id);
+ DRM_DEBUG_DP("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
+ acrtc->crtc_id);
}
static void update_freesync_state_on_stream(
@@ -8265,9 +8264,9 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
&bundle->flip_addrs[planes_count].address,
afb->tmz_surface, false);
- DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
- new_plane_state->plane->index,
- bundle->plane_infos[planes_count].dcc.enable);
+ DRM_DEBUG_DP("plane: id=%d dcc_en=%d\n",
+ new_plane_state->plane->index,
+ bundle->plane_infos[planes_count].dcc.enable);
bundle->surface_updates[planes_count].plane_info =
&bundle->plane_infos[planes_count];
@@ -8299,10 +8298,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
dc_plane,
bundle->flip_addrs[planes_count].flip_timestamp_in_us);
- DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
- __func__,
- bundle->flip_addrs[planes_count].address.grph.addr.high_part,
- bundle->flip_addrs[planes_count].address.grph.addr.low_part);
+ DRM_DEBUG_DP("%s Flipping to hi: 0x%x, low: 0x%x\n",
+ __func__,
+ bundle->flip_addrs[planes_count].address.grph.addr.high_part,
+ bundle->flip_addrs[planes_count].address.grph.addr.low_part);
planes_count += 1;
@@ -8621,7 +8620,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_DP(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -8655,7 +8654,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
- DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_DP("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
if (!dm_new_crtc_state->stream) {
/*
@@ -8688,7 +8687,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
crtc->hwmode = new_crtc_state->mode;
mode_set_reset_required = true;
} else if (modereset_required(new_crtc_state)) {
- DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_DP("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
/* i.e. reset mode */
if (dm_old_crtc_state->stream)
remove_stream(adev, acrtc, dm_old_crtc_state->stream);
@@ -9298,7 +9297,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
goto skip_modeset;
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_DP(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -9382,8 +9381,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
dc_stream_retain(new_stream);
- DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
- crtc->base.id);
+ DRM_DEBUG_DP("Enabling DRM crtc: %d\n",
+ crtc->base.id);
if (dc_add_stream_to_ctx(
dm->dc,
@@ -9728,8 +9727,8 @@ static int dm_update_plane_state(struct dc *dc,
if (!dc_new_plane_state)
return -ENOMEM;
- DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
- plane->base.id, new_plane_crtc->base.id);
+ DRM_DEBUG_DP("Enabling DRM plane: %d on DRM crtc %d\n",
+ plane->base.id, new_plane_crtc->base.id);
ret = fill_dc_plane_attributes(
drm_to_adev(new_plane_crtc->dev),
--
2.31.0.rc2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Use DRM_DEBUG_DP
2021-03-23 0:31 [PATCH] drm/amd/display: Use DRM_DEBUG_DP Luben Tuikov
@ 2021-03-23 14:26 ` Alex Deucher
2021-03-23 16:01 ` Harry Wentland
0 siblings, 1 reply; 6+ messages in thread
From: Alex Deucher @ 2021-03-23 14:26 UTC (permalink / raw)
To: Luben Tuikov; +Cc: Alex Deucher, Harry Wentland, amd-gfx list
On Mon, Mar 22, 2021 at 8:31 PM Luben Tuikov <luben.tuikov@amd.com> wrote:
>
> Convert IRQ-based prints from DRM_DEBUG_DRIVER to
> DRM_DEBUG_DP, as the latter is not used in drm/amd
> prior to this patch and since IRQ-based prints
> drown out the rest of the driver's
> DRM_DEBUG_DRIVER messages.
>
> Cc: Harry Wentland <Harry.Wentland@amd.com>
> Cc: Alex Deucher <alexander.deucher@amd.com>
> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
> ---
> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 +++++++++----------
> 1 file changed, 33 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> index f455fc3aa561..aabaa652f6dc 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
> amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
> spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
>
> - DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
> - amdgpu_crtc->crtc_id, amdgpu_crtc,
> - vrr_active, (int) !e);
> + DRM_DEBUG_DP("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
Should probably be _KMS or _ATOMIC since this is not displayport specific.
> + amdgpu_crtc->crtc_id, amdgpu_crtc,
> + vrr_active, (int) !e);
> }
>
> static void dm_vupdate_high_irq(void *interrupt_params)
> @@ -993,8 +993,7 @@ static void event_mall_stutter(struct work_struct *work)
> dc_allow_idle_optimizations(
> dm->dc, dm->active_vblank_irq_count == 0);
>
> - DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
> -
> + DRM_DEBUG_DP("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
Maybe _VBL or _KMS or _ATOMIC?
>
> mutex_unlock(&dm->dc_lock);
> }
> @@ -1810,8 +1809,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
> if (acrtc && state->stream_status[i].plane_count != 0) {
> irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
> rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
> - DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
> - acrtc->crtc_id, enable ? "en" : "dis", rc);
> + DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
> + acrtc->crtc_id, enable ? "en" : "dis", rc);
I think this should be _VBL.
> if (rc)
> DRM_WARN("Failed to %s pflip interrupts\n",
> enable ? "enable" : "disable");
> @@ -4966,8 +4965,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
> stream->src = src;
> stream->dst = dst;
>
> - DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
> - dst.x, dst.y, dst.width, dst.height);
> + DRM_DEBUG_DP("Destination Rectangle x:%d y:%d width:%d height:%d\n",
> + dst.x, dst.y, dst.width, dst.height);
Should probably be _KMS or _ATOMIC since this is not displayport specific.
>
> }
>
> @@ -5710,8 +5709,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
>
> rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
>
> - DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
> - acrtc->crtc_id, enable ? "en" : "dis", rc);
> + DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
> + acrtc->crtc_id, enable ? "en" : "dis", rc);
Should probably be _VBL.
> return rc;
> }
>
> @@ -6664,7 +6663,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
> int r;
>
> if (!new_state->fb) {
> - DRM_DEBUG_DRIVER("No FB bound\n");
> + DRM_DEBUG_DP("No FB bound\n");
Should probably be _KMS or _ATOMIC since this is not displayport specific.
> return 0;
> }
>
> @@ -7896,11 +7895,11 @@ static void handle_cursor_update(struct drm_plane *plane,
> if (!plane->state->fb && !old_plane_state->fb)
> return;
>
> - DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
> - __func__,
> - amdgpu_crtc->crtc_id,
> - plane->state->crtc_w,
> - plane->state->crtc_h);
> + DRM_DEBUG_DP("%s: crtc_id=%d with size %d to %d\n",
> + __func__,
> + amdgpu_crtc->crtc_id,
> + plane->state->crtc_w,
> + plane->state->crtc_h);
Should probably be _KMS or _ATOMIC since this is not displayport specific.
>
> ret = get_cursor_position(plane, crtc, &position);
> if (ret)
> @@ -7958,8 +7957,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
> /* Mark this event as consumed */
> acrtc->base.state->event = NULL;
>
> - DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
> - acrtc->crtc_id);
> + DRM_DEBUG_DP("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
> + acrtc->crtc_id);
Should probably be _KMS or _ATOMIC since this is not displayport specific.
> }
>
> static void update_freesync_state_on_stream(
> @@ -8265,9 +8264,9 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
> &bundle->flip_addrs[planes_count].address,
> afb->tmz_surface, false);
>
> - DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
> - new_plane_state->plane->index,
> - bundle->plane_infos[planes_count].dcc.enable);
> + DRM_DEBUG_DP("plane: id=%d dcc_en=%d\n",
> + new_plane_state->plane->index,
> + bundle->plane_infos[planes_count].dcc.enable);
Should probably be _ATOMIC.
>
> bundle->surface_updates[planes_count].plane_info =
> &bundle->plane_infos[planes_count];
> @@ -8299,10 +8298,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
> dc_plane,
> bundle->flip_addrs[planes_count].flip_timestamp_in_us);
>
> - DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
> - __func__,
> - bundle->flip_addrs[planes_count].address.grph.addr.high_part,
> - bundle->flip_addrs[planes_count].address.grph.addr.low_part);
> + DRM_DEBUG_DP("%s Flipping to hi: 0x%x, low: 0x%x\n",
> + __func__,
> + bundle->flip_addrs[planes_count].address.grph.addr.high_part,
> + bundle->flip_addrs[planes_count].address.grph.addr.low_part);
>
Same here.
> planes_count += 1;
>
> @@ -8621,7 +8620,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
> dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
> dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
>
> - DRM_DEBUG_DRIVER(
> + DRM_DEBUG_DP(
And here.
> "amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
> "planes_changed:%d, mode_changed:%d,active_changed:%d,"
> "connectors_changed:%d\n",
> @@ -8655,7 +8654,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
>
> if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
>
> - DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
> + DRM_DEBUG_DP("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
>
And here.
> if (!dm_new_crtc_state->stream) {
> /*
> @@ -8688,7 +8687,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
> crtc->hwmode = new_crtc_state->mode;
> mode_set_reset_required = true;
> } else if (modereset_required(new_crtc_state)) {
> - DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
> + DRM_DEBUG_DP("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
And here.
> /* i.e. reset mode */
> if (dm_old_crtc_state->stream)
> remove_stream(adev, acrtc, dm_old_crtc_state->stream);
> @@ -9298,7 +9297,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
> if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
> goto skip_modeset;
>
> - DRM_DEBUG_DRIVER(
> + DRM_DEBUG_DP(
Should probably be _KMS or _ATOMIC since this is not displayport specific.
> "amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
> "planes_changed:%d, mode_changed:%d,active_changed:%d,"
> "connectors_changed:%d\n",
> @@ -9382,8 +9381,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
>
> dc_stream_retain(new_stream);
>
> - DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
> - crtc->base.id);
> + DRM_DEBUG_DP("Enabling DRM crtc: %d\n",
> + crtc->base.id);
>
Same here.
> if (dc_add_stream_to_ctx(
> dm->dc,
> @@ -9728,8 +9727,8 @@ static int dm_update_plane_state(struct dc *dc,
> if (!dc_new_plane_state)
> return -ENOMEM;
>
> - DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
> - plane->base.id, new_plane_crtc->base.id);
> + DRM_DEBUG_DP("Enabling DRM plane: %d on DRM crtc %d\n",
> + plane->base.id, new_plane_crtc->base.id);
>
And here.
> ret = fill_dc_plane_attributes(
> drm_to_adev(new_plane_crtc->dev),
> --
> 2.31.0.rc2
>
> _______________________________________________
> amd-gfx mailing list
> amd-gfx@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Use DRM_DEBUG_DP
2021-03-23 14:26 ` Alex Deucher
@ 2021-03-23 16:01 ` Harry Wentland
2021-03-23 20:26 ` Luben Tuikov
0 siblings, 1 reply; 6+ messages in thread
From: Harry Wentland @ 2021-03-23 16:01 UTC (permalink / raw)
To: Alex Deucher, Luben Tuikov; +Cc: Alex Deucher, amd-gfx list
Thanks for converting these away from _DRIVER.
On 2021-03-23 10:26 a.m., Alex Deucher wrote:
> On Mon, Mar 22, 2021 at 8:31 PM Luben Tuikov <luben.tuikov@amd.com> wrote:
>>
>> Convert IRQ-based prints from DRM_DEBUG_DRIVER to
>> DRM_DEBUG_DP, as the latter is not used in drm/amd
>> prior to this patch and since IRQ-based prints
>> drown out the rest of the driver's
>> DRM_DEBUG_DRIVER messages.
>>
>> Cc: Harry Wentland <Harry.Wentland@amd.com>
>> Cc: Alex Deucher <alexander.deucher@amd.com>
>> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
>> ---
>> .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 67 +++++++++----------
>> 1 file changed, 33 insertions(+), 34 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> index f455fc3aa561..aabaa652f6dc 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
>> @@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
>> amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
>> spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
>>
>> - DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
>> - amdgpu_crtc->crtc_id, amdgpu_crtc,
>> - vrr_active, (int) !e);
>> + DRM_DEBUG_DP("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
It looks like _ATOMIC is strictly for code dealing with atomic. KMS is a
better bet.
_KMS
>
>> + amdgpu_crtc->crtc_id, amdgpu_crtc,
>> + vrr_active, (int) !e);
>> }
>>
>> static void dm_vupdate_high_irq(void *interrupt_params)
>> @@ -993,8 +993,7 @@ static void event_mall_stutter(struct work_struct *work)
>> dc_allow_idle_optimizations(
>> dm->dc, dm->active_vblank_irq_count == 0);
>>
>> - DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
>> -
>> + DRM_DEBUG_DP("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
>
> Maybe _VBL or _KMS or _ATOMIC?
>
_KMS
>>
>> mutex_unlock(&dm->dc_lock);
>> }
>> @@ -1810,8 +1809,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
>> if (acrtc && state->stream_status[i].plane_count != 0) {
>> irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
>> rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
>> - DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
>> - acrtc->crtc_id, enable ? "en" : "dis", rc);
>> + DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
>> + acrtc->crtc_id, enable ? "en" : "dis", rc);
>
> I think this should be _VBL.
>
_VBL
>> if (rc)
>> DRM_WARN("Failed to %s pflip interrupts\n",
>> enable ? "enable" : "disable");
>> @@ -4966,8 +4965,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
>> stream->src = src;
>> stream->dst = dst;
>>
>> - DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
>> - dst.x, dst.y, dst.width, dst.height);
>> + DRM_DEBUG_DP("Destination Rectangle x:%d y:%d width:%d height:%d\n",
>> + dst.x, dst.y, dst.width, dst.height);
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
>
_KMS
>>
>> }
>>
>> @@ -5710,8 +5709,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
>>
>> rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
>>
>> - DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
>> - acrtc->crtc_id, enable ? "en" : "dis", rc);
>> + DRM_DEBUG_DP("crtc %d - vupdate irq %sabling: r=%d\n",
>> + acrtc->crtc_id, enable ? "en" : "dis", rc);
>
> Should probably be _VBL.
>
_VBL
>> return rc;
>> }
>>
>> @@ -6664,7 +6663,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
>> int r;
>>
>> if (!new_state->fb) {
>> - DRM_DEBUG_DRIVER("No FB bound\n");
>> + DRM_DEBUG_DP("No FB bound\n");
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
>
_KMS
>> return 0;
>> }
>>
>> @@ -7896,11 +7895,11 @@ static void handle_cursor_update(struct drm_plane *plane,
>> if (!plane->state->fb && !old_plane_state->fb)
>> return;
>>
>> - DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
>> - __func__,
>> - amdgpu_crtc->crtc_id,
>> - plane->state->crtc_w,
>> - plane->state->crtc_h);
>> + DRM_DEBUG_DP("%s: crtc_id=%d with size %d to %d\n",
>> + __func__,
>> + amdgpu_crtc->crtc_id,
>> + plane->state->crtc_w,
>> + plane->state->crtc_h);
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
_KMS
>
>>
>> ret = get_cursor_position(plane, crtc, &position);
>> if (ret)
>> @@ -7958,8 +7957,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
>> /* Mark this event as consumed */
>> acrtc->base.state->event = NULL;
>>
>> - DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
>> - acrtc->crtc_id);
>> + DRM_DEBUG_DP("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
>> + acrtc->crtc_id);
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
_KMS
>
>> }
>>
>> static void update_freesync_state_on_stream(
>> @@ -8265,9 +8264,9 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>> &bundle->flip_addrs[planes_count].address,
>> afb->tmz_surface, false);
>>
>> - DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
>> - new_plane_state->plane->index,
>> - bundle->plane_infos[planes_count].dcc.enable);
>> + DRM_DEBUG_DP("plane: id=%d dcc_en=%d\n",
>> + new_plane_state->plane->index,
>> + bundle->plane_infos[planes_count].dcc.enable);
>
> Should probably be _ATOMIC.
_ATOMIC here and below
Harry
>
>>
>> bundle->surface_updates[planes_count].plane_info =
>> &bundle->plane_infos[planes_count];
>> @@ -8299,10 +8298,10 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
>> dc_plane,
>> bundle->flip_addrs[planes_count].flip_timestamp_in_us);
>>
>> - DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
>> - __func__,
>> - bundle->flip_addrs[planes_count].address.grph.addr.high_part,
>> - bundle->flip_addrs[planes_count].address.grph.addr.low_part);
>> + DRM_DEBUG_DP("%s Flipping to hi: 0x%x, low: 0x%x\n",
>> + __func__,
>> + bundle->flip_addrs[planes_count].address.grph.addr.high_part,
>> + bundle->flip_addrs[planes_count].address.grph.addr.low_part);
>>
>
> Same here.
>
>> planes_count += 1;
>>
>> @@ -8621,7 +8620,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
>> dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
>> dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
>>
>> - DRM_DEBUG_DRIVER(
>> + DRM_DEBUG_DP(
>
> And here.
>
>> "amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
>> "planes_changed:%d, mode_changed:%d,active_changed:%d,"
>> "connectors_changed:%d\n",
>> @@ -8655,7 +8654,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
>>
>> if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
>>
>> - DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
>> + DRM_DEBUG_DP("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
>>
>
> And here.
>
>> if (!dm_new_crtc_state->stream) {
>> /*
>> @@ -8688,7 +8687,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
>> crtc->hwmode = new_crtc_state->mode;
>> mode_set_reset_required = true;
>> } else if (modereset_required(new_crtc_state)) {
>> - DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
>> + DRM_DEBUG_DP("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
>
> And here.
>
>> /* i.e. reset mode */
>> if (dm_old_crtc_state->stream)
>> remove_stream(adev, acrtc, dm_old_crtc_state->stream);
>> @@ -9298,7 +9297,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
>> if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
>> goto skip_modeset;
>>
>> - DRM_DEBUG_DRIVER(
>> + DRM_DEBUG_DP(
>
> Should probably be _KMS or _ATOMIC since this is not displayport specific.
>
>> "amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
>> "planes_changed:%d, mode_changed:%d,active_changed:%d,"
>> "connectors_changed:%d\n",
>> @@ -9382,8 +9381,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
>>
>> dc_stream_retain(new_stream);
>>
>> - DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
>> - crtc->base.id);
>> + DRM_DEBUG_DP("Enabling DRM crtc: %d\n",
>> + crtc->base.id);
>>
>
> Same here.
>
>> if (dc_add_stream_to_ctx(
>> dm->dc,
>> @@ -9728,8 +9727,8 @@ static int dm_update_plane_state(struct dc *dc,
>> if (!dc_new_plane_state)
>> return -ENOMEM;
>>
>> - DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
>> - plane->base.id, new_plane_crtc->base.id);
>> + DRM_DEBUG_DP("Enabling DRM plane: %d on DRM crtc %d\n",
>> + plane->base.id, new_plane_crtc->base.id);
>>
>
> And here.
>
>> ret = fill_dc_plane_attributes(
>> drm_to_adev(new_plane_crtc->dev),
>> --
>> 2.31.0.rc2
>>
>> _______________________________________________
>> amd-gfx mailing list
>> amd-gfx@lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/amd-gfx>
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH] drm/amd/display: Use DRM_DEBUG_DP
2021-03-23 16:01 ` Harry Wentland
@ 2021-03-23 20:26 ` Luben Tuikov
2021-03-23 23:07 ` [PATCH v2] " Luben Tuikov
2021-03-24 2:34 ` [PATCH] " Deucher, Alexander
0 siblings, 2 replies; 6+ messages in thread
From: Luben Tuikov @ 2021-03-23 20:26 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Luben Tuikov, Harry Wentland
Convert IRQ-based prints from DRM_DEBUG_DRIVER to
DRM_DEBUG_DP, as the latter is not used in drm/amd
prior to this patch and since IRQ-based prints
drown out the rest of the driver's
DRM_DEBUG_DRIVER messages.
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 57 +++++++++----------
1 file changed, 28 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f455fc3aa561..9376d44ce3b4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
- DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
- amdgpu_crtc->crtc_id, amdgpu_crtc,
- vrr_active, (int) !e);
+ DRM_DEBUG_KMS("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
+ amdgpu_crtc->crtc_id, amdgpu_crtc,
+ vrr_active, (int) !e);
}
static void dm_vupdate_high_irq(void *interrupt_params)
@@ -993,8 +993,7 @@ static void event_mall_stutter(struct work_struct *work)
dc_allow_idle_optimizations(
dm->dc, dm->active_vblank_irq_count == 0);
- DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
-
+ DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
mutex_unlock(&dm->dc_lock);
}
@@ -1810,8 +1809,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
if (acrtc && state->stream_status[i].plane_count != 0) {
irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
if (rc)
DRM_WARN("Failed to %s pflip interrupts\n",
enable ? "enable" : "disable");
@@ -4966,8 +4965,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
stream->src = src;
stream->dst = dst;
- DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
- dst.x, dst.y, dst.width, dst.height);
+ DRM_DEBUG_KMS("Destination Rectangle x:%d y:%d width:%d height:%d\n",
+ dst.x, dst.y, dst.width, dst.height);
}
@@ -5710,8 +5709,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
return rc;
}
@@ -6664,7 +6663,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
int r;
if (!new_state->fb) {
- DRM_DEBUG_DRIVER("No FB bound\n");
+ DRM_DEBUG_KMS("No FB bound\n");
return 0;
}
@@ -7896,11 +7895,11 @@ static void handle_cursor_update(struct drm_plane *plane,
if (!plane->state->fb && !old_plane_state->fb)
return;
- DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
- __func__,
- amdgpu_crtc->crtc_id,
- plane->state->crtc_w,
- plane->state->crtc_h);
+ DRM_DEBUG_KMS("%s: crtc_id=%d with size %d to %d\n",
+ __func__,
+ amdgpu_crtc->crtc_id,
+ plane->state->crtc_w,
+ plane->state->crtc_h);
ret = get_cursor_position(plane, crtc, &position);
if (ret)
@@ -7958,8 +7957,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
/* Mark this event as consumed */
acrtc->base.state->event = NULL;
- DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
- acrtc->crtc_id);
+ DRM_DEBUG_KMS("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
+ acrtc->crtc_id);
}
static void update_freesync_state_on_stream(
@@ -8265,7 +8264,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
&bundle->flip_addrs[planes_count].address,
afb->tmz_surface, false);
- DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
+ DRM_DEBUG_ATOMIC("plane: id=%d dcc_en=%d\n",
new_plane_state->plane->index,
bundle->plane_infos[planes_count].dcc.enable);
@@ -8299,7 +8298,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
dc_plane,
bundle->flip_addrs[planes_count].flip_timestamp_in_us);
- DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
+ DRM_DEBUG_ATOMIC("%s Flipping to hi: 0x%x, low: 0x%x\n",
__func__,
bundle->flip_addrs[planes_count].address.grph.addr.high_part,
bundle->flip_addrs[planes_count].address.grph.addr.low_part);
@@ -8621,7 +8620,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -8655,7 +8654,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
- DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
if (!dm_new_crtc_state->stream) {
/*
@@ -8688,7 +8687,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
crtc->hwmode = new_crtc_state->mode;
mode_set_reset_required = true;
} else if (modereset_required(new_crtc_state)) {
- DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
/* i.e. reset mode */
if (dm_old_crtc_state->stream)
remove_stream(adev, acrtc, dm_old_crtc_state->stream);
@@ -9298,7 +9297,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
goto skip_modeset;
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -9382,8 +9381,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
dc_stream_retain(new_stream);
- DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
- crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM crtc: %d\n",
+ crtc->base.id);
if (dc_add_stream_to_ctx(
dm->dc,
@@ -9728,8 +9727,8 @@ static int dm_update_plane_state(struct dc *dc,
if (!dc_new_plane_state)
return -ENOMEM;
- DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
- plane->base.id, new_plane_crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM plane: %d on DRM crtc %d\n",
+ plane->base.id, new_plane_crtc->base.id);
ret = fill_dc_plane_attributes(
drm_to_adev(new_plane_crtc->dev),
--
2.31.0.rc2
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2] drm/amd/display: Use DRM_DEBUG_DP
2021-03-23 20:26 ` Luben Tuikov
@ 2021-03-23 23:07 ` Luben Tuikov
2021-03-24 2:34 ` [PATCH] " Deucher, Alexander
1 sibling, 0 replies; 6+ messages in thread
From: Luben Tuikov @ 2021-03-23 23:07 UTC (permalink / raw)
To: amd-gfx; +Cc: Alex Deucher, Luben Tuikov, Harry Wentland
Convert IRQ-based prints from DRM_DEBUG_DRIVER to
the appropriate DRM log type, since IRQ-based
prints drown out the rest of the driver's
DRM_DEBUG_DRIVER messages.
v2: Update as per feedback to fine-tune for each
type of DRM log level.
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 57 +++++++++----------
1 file changed, 28 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index ce615554faed..e923414777e6 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
- DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
- amdgpu_crtc->crtc_id, amdgpu_crtc,
- vrr_active, (int) !e);
+ DRM_DEBUG_KMS("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
+ amdgpu_crtc->crtc_id, amdgpu_crtc,
+ vrr_active, (int) !e);
}
static void dm_vupdate_high_irq(void *interrupt_params)
@@ -1019,8 +1019,7 @@ static void event_mall_stutter(struct work_struct *work)
dc_allow_idle_optimizations(
dm->dc, dm->active_vblank_irq_count == 0);
- DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
-
+ DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
mutex_unlock(&dm->dc_lock);
}
@@ -1836,8 +1835,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
if (acrtc && state->stream_status[i].plane_count != 0) {
irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
if (rc)
DRM_WARN("Failed to %s pflip interrupts\n",
enable ? "enable" : "disable");
@@ -5014,8 +5013,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
stream->src = src;
stream->dst = dst;
- DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
- dst.x, dst.y, dst.width, dst.height);
+ DRM_DEBUG_KMS("Destination Rectangle x:%d y:%d width:%d height:%d\n",
+ dst.x, dst.y, dst.width, dst.height);
}
@@ -5758,8 +5757,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
return rc;
}
@@ -6712,7 +6711,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
int r;
if (!new_state->fb) {
- DRM_DEBUG_DRIVER("No FB bound\n");
+ DRM_DEBUG_KMS("No FB bound\n");
return 0;
}
@@ -7944,11 +7943,11 @@ static void handle_cursor_update(struct drm_plane *plane,
if (!plane->state->fb && !old_plane_state->fb)
return;
- DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
- __func__,
- amdgpu_crtc->crtc_id,
- plane->state->crtc_w,
- plane->state->crtc_h);
+ DRM_DEBUG_KMS("%s: crtc_id=%d with size %d to %d\n",
+ __func__,
+ amdgpu_crtc->crtc_id,
+ plane->state->crtc_w,
+ plane->state->crtc_h);
ret = get_cursor_position(plane, crtc, &position);
if (ret)
@@ -8006,8 +8005,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
/* Mark this event as consumed */
acrtc->base.state->event = NULL;
- DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
- acrtc->crtc_id);
+ DRM_DEBUG_KMS("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
+ acrtc->crtc_id);
}
static void update_freesync_state_on_stream(
@@ -8313,7 +8312,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
&bundle->flip_addrs[planes_count].address,
afb->tmz_surface, false);
- DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
+ DRM_DEBUG_ATOMIC("plane: id=%d dcc_en=%d\n",
new_plane_state->plane->index,
bundle->plane_infos[planes_count].dcc.enable);
@@ -8347,7 +8346,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
dc_plane,
bundle->flip_addrs[planes_count].flip_timestamp_in_us);
- DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
+ DRM_DEBUG_ATOMIC("%s Flipping to hi: 0x%x, low: 0x%x\n",
__func__,
bundle->flip_addrs[planes_count].address.grph.addr.high_part,
bundle->flip_addrs[planes_count].address.grph.addr.low_part);
@@ -8669,7 +8668,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -8703,7 +8702,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
- DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
if (!dm_new_crtc_state->stream) {
/*
@@ -8736,7 +8735,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
crtc->hwmode = new_crtc_state->mode;
mode_set_reset_required = true;
} else if (modereset_required(new_crtc_state)) {
- DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
/* i.e. reset mode */
if (dm_old_crtc_state->stream)
remove_stream(adev, acrtc, dm_old_crtc_state->stream);
@@ -9346,7 +9345,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
goto skip_modeset;
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -9430,8 +9429,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
dc_stream_retain(new_stream);
- DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
- crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM crtc: %d\n",
+ crtc->base.id);
if (dc_add_stream_to_ctx(
dm->dc,
@@ -9776,8 +9775,8 @@ static int dm_update_plane_state(struct dc *dc,
if (!dc_new_plane_state)
return -ENOMEM;
- DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
- plane->base.id, new_plane_crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM plane: %d on DRM crtc %d\n",
+ plane->base.id, new_plane_crtc->base.id);
ret = fill_dc_plane_attributes(
drm_to_adev(new_plane_crtc->dev),
--
2.31.0.97.g1424303384
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH] drm/amd/display: Use DRM_DEBUG_DP
2021-03-23 20:26 ` Luben Tuikov
2021-03-23 23:07 ` [PATCH v2] " Luben Tuikov
@ 2021-03-24 2:34 ` Deucher, Alexander
1 sibling, 0 replies; 6+ messages in thread
From: Deucher, Alexander @ 2021-03-24 2:34 UTC (permalink / raw)
To: Tuikov, Luben, amd-gfx; +Cc: Wentland, Harry
[-- Attachment #1.1: Type: text/plain, Size: 9994 bytes --]
[AMD Official Use Only - Internal Distribution Only]
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
________________________________
From: Tuikov, Luben <Luben.Tuikov@amd.com>
Sent: Tuesday, March 23, 2021 4:26 PM
To: amd-gfx@lists.freedesktop.org <amd-gfx@lists.freedesktop.org>
Cc: Tuikov, Luben <Luben.Tuikov@amd.com>; Wentland, Harry <Harry.Wentland@amd.com>; Deucher, Alexander <Alexander.Deucher@amd.com>
Subject: [PATCH] drm/amd/display: Use DRM_DEBUG_DP
Convert IRQ-based prints from DRM_DEBUG_DRIVER to
DRM_DEBUG_DP, as the latter is not used in drm/amd
prior to this patch and since IRQ-based prints
drown out the rest of the driver's
DRM_DEBUG_DRIVER messages.
Cc: Harry Wentland <Harry.Wentland@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
.../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 57 +++++++++----------
1 file changed, 28 insertions(+), 29 deletions(-)
diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
index f455fc3aa561..9376d44ce3b4 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -449,9 +449,9 @@ static void dm_pflip_high_irq(void *interrupt_params)
amdgpu_crtc->pflip_status = AMDGPU_FLIP_NONE;
spin_unlock_irqrestore(&adev_to_drm(adev)->event_lock, flags);
- DRM_DEBUG_DRIVER("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
- amdgpu_crtc->crtc_id, amdgpu_crtc,
- vrr_active, (int) !e);
+ DRM_DEBUG_KMS("crtc:%d[%p], pflip_stat:AMDGPU_FLIP_NONE, vrr[%d]-fp %d\n",
+ amdgpu_crtc->crtc_id, amdgpu_crtc,
+ vrr_active, (int) !e);
}
static void dm_vupdate_high_irq(void *interrupt_params)
@@ -993,8 +993,7 @@ static void event_mall_stutter(struct work_struct *work)
dc_allow_idle_optimizations(
dm->dc, dm->active_vblank_irq_count == 0);
- DRM_DEBUG_DRIVER("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
-
+ DRM_DEBUG_KMS("Allow idle optimizations (MALL): %d\n", dm->active_vblank_irq_count == 0);
mutex_unlock(&dm->dc_lock);
}
@@ -1810,8 +1809,8 @@ static void dm_gpureset_toggle_interrupts(struct amdgpu_device *adev,
if (acrtc && state->stream_status[i].plane_count != 0) {
irq_source = IRQ_TYPE_PFLIP + acrtc->otg_inst;
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
if (rc)
DRM_WARN("Failed to %s pflip interrupts\n",
enable ? "enable" : "disable");
@@ -4966,8 +4965,8 @@ static void update_stream_scaling_settings(const struct drm_display_mode *mode,
stream->src = src;
stream->dst = dst;
- DRM_DEBUG_DRIVER("Destination Rectangle x:%d y:%d width:%d height:%d\n",
- dst.x, dst.y, dst.width, dst.height);
+ DRM_DEBUG_KMS("Destination Rectangle x:%d y:%d width:%d height:%d\n",
+ dst.x, dst.y, dst.width, dst.height);
}
@@ -5710,8 +5709,8 @@ static inline int dm_set_vupdate_irq(struct drm_crtc *crtc, bool enable)
rc = dc_interrupt_set(adev->dm.dc, irq_source, enable) ? 0 : -EBUSY;
- DRM_DEBUG_DRIVER("crtc %d - vupdate irq %sabling: r=%d\n",
- acrtc->crtc_id, enable ? "en" : "dis", rc);
+ DRM_DEBUG_VBL("crtc %d - vupdate irq %sabling: r=%d\n",
+ acrtc->crtc_id, enable ? "en" : "dis", rc);
return rc;
}
@@ -6664,7 +6663,7 @@ static int dm_plane_helper_prepare_fb(struct drm_plane *plane,
int r;
if (!new_state->fb) {
- DRM_DEBUG_DRIVER("No FB bound\n");
+ DRM_DEBUG_KMS("No FB bound\n");
return 0;
}
@@ -7896,11 +7895,11 @@ static void handle_cursor_update(struct drm_plane *plane,
if (!plane->state->fb && !old_plane_state->fb)
return;
- DRM_DEBUG_DRIVER("%s: crtc_id=%d with size %d to %d\n",
- __func__,
- amdgpu_crtc->crtc_id,
- plane->state->crtc_w,
- plane->state->crtc_h);
+ DRM_DEBUG_KMS("%s: crtc_id=%d with size %d to %d\n",
+ __func__,
+ amdgpu_crtc->crtc_id,
+ plane->state->crtc_w,
+ plane->state->crtc_h);
ret = get_cursor_position(plane, crtc, &position);
if (ret)
@@ -7958,8 +7957,8 @@ static void prepare_flip_isr(struct amdgpu_crtc *acrtc)
/* Mark this event as consumed */
acrtc->base.state->event = NULL;
- DRM_DEBUG_DRIVER("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
- acrtc->crtc_id);
+ DRM_DEBUG_KMS("crtc:%d, pflip_stat:AMDGPU_FLIP_SUBMITTED\n",
+ acrtc->crtc_id);
}
static void update_freesync_state_on_stream(
@@ -8265,7 +8264,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
&bundle->flip_addrs[planes_count].address,
afb->tmz_surface, false);
- DRM_DEBUG_DRIVER("plane: id=%d dcc_en=%d\n",
+ DRM_DEBUG_ATOMIC("plane: id=%d dcc_en=%d\n",
new_plane_state->plane->index,
bundle->plane_infos[planes_count].dcc.enable);
@@ -8299,7 +8298,7 @@ static void amdgpu_dm_commit_planes(struct drm_atomic_state *state,
dc_plane,
bundle->flip_addrs[planes_count].flip_timestamp_in_us);
- DRM_DEBUG_DRIVER("%s Flipping to hi: 0x%x, low: 0x%x\n",
+ DRM_DEBUG_ATOMIC("%s Flipping to hi: 0x%x, low: 0x%x\n",
__func__,
bundle->flip_addrs[planes_count].address.grph.addr.high_part,
bundle->flip_addrs[planes_count].address.grph.addr.low_part);
@@ -8621,7 +8620,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
dm_new_crtc_state = to_dm_crtc_state(new_crtc_state);
dm_old_crtc_state = to_dm_crtc_state(old_crtc_state);
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -8655,7 +8654,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
if (modeset_required(new_crtc_state, dm_new_crtc_state->stream, dm_old_crtc_state->stream)) {
- DRM_DEBUG_DRIVER("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: SET crtc id %d: [%p]\n", acrtc->crtc_id, acrtc);
if (!dm_new_crtc_state->stream) {
/*
@@ -8688,7 +8687,7 @@ static void amdgpu_dm_atomic_commit_tail(struct drm_atomic_state *state)
crtc->hwmode = new_crtc_state->mode;
mode_set_reset_required = true;
} else if (modereset_required(new_crtc_state)) {
- DRM_DEBUG_DRIVER("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
+ DRM_DEBUG_ATOMIC("Atomic commit: RESET. crtc id %d:[%p]\n", acrtc->crtc_id, acrtc);
/* i.e. reset mode */
if (dm_old_crtc_state->stream)
remove_stream(adev, acrtc, dm_old_crtc_state->stream);
@@ -9298,7 +9297,7 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
if (!drm_atomic_crtc_needs_modeset(new_crtc_state))
goto skip_modeset;
- DRM_DEBUG_DRIVER(
+ DRM_DEBUG_ATOMIC(
"amdgpu_crtc id:%d crtc_state_flags: enable:%d, active:%d, "
"planes_changed:%d, mode_changed:%d,active_changed:%d,"
"connectors_changed:%d\n",
@@ -9382,8 +9381,8 @@ static int dm_update_crtc_state(struct amdgpu_display_manager *dm,
dc_stream_retain(new_stream);
- DRM_DEBUG_DRIVER("Enabling DRM crtc: %d\n",
- crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM crtc: %d\n",
+ crtc->base.id);
if (dc_add_stream_to_ctx(
dm->dc,
@@ -9728,8 +9727,8 @@ static int dm_update_plane_state(struct dc *dc,
if (!dc_new_plane_state)
return -ENOMEM;
- DRM_DEBUG_DRIVER("Enabling DRM plane: %d on DRM crtc %d\n",
- plane->base.id, new_plane_crtc->base.id);
+ DRM_DEBUG_ATOMIC("Enabling DRM plane: %d on DRM crtc %d\n",
+ plane->base.id, new_plane_crtc->base.id);
ret = fill_dc_plane_attributes(
drm_to_adev(new_plane_crtc->dev),
--
2.31.0.rc2
[-- Attachment #1.2: Type: text/html, Size: 23543 bytes --]
[-- Attachment #2: Type: text/plain, Size: 154 bytes --]
_______________________________________________
amd-gfx mailing list
amd-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2021-03-24 2:34 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-23 0:31 [PATCH] drm/amd/display: Use DRM_DEBUG_DP Luben Tuikov
2021-03-23 14:26 ` Alex Deucher
2021-03-23 16:01 ` Harry Wentland
2021-03-23 20:26 ` Luben Tuikov
2021-03-23 23:07 ` [PATCH v2] " Luben Tuikov
2021-03-24 2:34 ` [PATCH] " Deucher, Alexander
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.