All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Don't fill up the logs
@ 2022-02-24 21:45 Luben Tuikov
  2022-02-24 22:21 ` Alex Deucher
  0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2022-02-24 21:45 UTC (permalink / raw)
  To: amd-gfx
  Cc: Felix Kuehling, Roman Li, Hersen Wu, Daniel Wheeler,
	Luben Tuikov, Alex Deucher

Don't fill up the logs with:

[253557.859575] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
[253557.892966] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
[253557.926070] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
[253557.959344] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.

which prints many times a second, when the kernel is run with
drm.debug=2.

Instead of DRM_DEBUG_DRIVER(), make it DRM_INFO_ONCE().

Cc: Alex Deucher <Alexander.Deucher@amd.com>
Cc: Roman Li <Roman.Li@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Cc: Hersen Wu <hersenwu@amd.com>
Cc: Daniel Wheeler <daniel.wheeler@amd.com>
Fixes: 5898243ba7acdb ("drm/amd/display: Add dsc pre-validation in atomic check")
Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
---
 .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c   | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
index 05573f073b21f7..0542034530b1b0 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
@@ -1198,11 +1198,11 @@ void pre_validate_dsc(struct drm_atomic_state *state,
 	struct dc_state *local_dc_state = NULL;
 
 	if (!is_dsc_precompute_needed(state)) {
-		DRM_DEBUG_DRIVER("DSC precompute is not needed.\n");
+		DRM_INFO_ONCE("DSC precompute is not needed.\n");
 		return;
 	}
 	if (dm_atomic_get_state(state, dm_state_ptr)) {
-		DRM_DEBUG_DRIVER("dm_atomic_get_state() failed\n");
+		DRM_INFO_ONCE("dm_atomic_get_state() failed\n");
 		return;
 	}
 	dm_state = *dm_state_ptr;
@@ -1245,7 +1245,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
 	}
 
 	if (!pre_compute_mst_dsc_configs_for_state(state, local_dc_state, vars)) {
-		DRM_DEBUG_DRIVER("pre_compute_mst_dsc_configs_for_state() failed\n");
+		DRM_INFO_ONCE("pre_compute_mst_dsc_configs_for_state() failed\n");
 		goto clean_exit;
 	}
 
@@ -1258,7 +1258,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
 
 		if (local_dc_state->streams[i] &&
 		    is_timing_changed(stream, local_dc_state->streams[i])) {
-			DRM_DEBUG_DRIVER("crtc[%d] needs mode_changed\n", i);
+			DRM_INFO_ONCE("crtc[%d] needs mode_changed\n", i);
 		} else {
 			int ind = find_crtc_index_in_state_by_stream(state, stream);
 

base-commit: bff980c7632ef3b0099ba230cf7d5c864db3e1a3
-- 
2.35.1.129.gb80121027d


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/display: Don't fill up the logs
  2022-02-24 21:45 [PATCH] drm/amd/display: Don't fill up the logs Luben Tuikov
@ 2022-02-24 22:21 ` Alex Deucher
  2022-02-24 22:49   ` Luben Tuikov
  0 siblings, 1 reply; 4+ messages in thread
From: Alex Deucher @ 2022-02-24 22:21 UTC (permalink / raw)
  To: Luben Tuikov
  Cc: Felix Kuehling, Roman Li, amd-gfx list, Daniel Wheeler,
	Hersen Wu, Alex Deucher

On Thu, Feb 24, 2022 at 4:46 PM Luben Tuikov <luben.tuikov@amd.com> wrote:
>
> Don't fill up the logs with:
>
> [253557.859575] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
> [253557.892966] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
> [253557.926070] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
> [253557.959344] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
>
> which prints many times a second, when the kernel is run with
> drm.debug=2.
>
> Instead of DRM_DEBUG_DRIVER(), make it DRM_INFO_ONCE().

Maybe convert to DRM_DEBUG_KMS() for consistency with the rest of the
display code?

Alex

>
> Cc: Alex Deucher <Alexander.Deucher@amd.com>
> Cc: Roman Li <Roman.Li@amd.com>
> Cc: Felix Kuehling <felix.kuehling@amd.com>
> Cc: Hersen Wu <hersenwu@amd.com>
> Cc: Daniel Wheeler <daniel.wheeler@amd.com>
> Fixes: 5898243ba7acdb ("drm/amd/display: Add dsc pre-validation in atomic check")
> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
> ---
>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c   | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> index 05573f073b21f7..0542034530b1b0 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> @@ -1198,11 +1198,11 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>         struct dc_state *local_dc_state = NULL;
>
>         if (!is_dsc_precompute_needed(state)) {
> -               DRM_DEBUG_DRIVER("DSC precompute is not needed.\n");
> +               DRM_INFO_ONCE("DSC precompute is not needed.\n");
>                 return;
>         }
>         if (dm_atomic_get_state(state, dm_state_ptr)) {
> -               DRM_DEBUG_DRIVER("dm_atomic_get_state() failed\n");
> +               DRM_INFO_ONCE("dm_atomic_get_state() failed\n");
>                 return;
>         }
>         dm_state = *dm_state_ptr;
> @@ -1245,7 +1245,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>         }
>
>         if (!pre_compute_mst_dsc_configs_for_state(state, local_dc_state, vars)) {
> -               DRM_DEBUG_DRIVER("pre_compute_mst_dsc_configs_for_state() failed\n");
> +               DRM_INFO_ONCE("pre_compute_mst_dsc_configs_for_state() failed\n");
>                 goto clean_exit;
>         }
>
> @@ -1258,7 +1258,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>
>                 if (local_dc_state->streams[i] &&
>                     is_timing_changed(stream, local_dc_state->streams[i])) {
> -                       DRM_DEBUG_DRIVER("crtc[%d] needs mode_changed\n", i);
> +                       DRM_INFO_ONCE("crtc[%d] needs mode_changed\n", i);
>                 } else {
>                         int ind = find_crtc_index_in_state_by_stream(state, stream);
>
>
> base-commit: bff980c7632ef3b0099ba230cf7d5c864db3e1a3
> --
> 2.35.1.129.gb80121027d
>

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] drm/amd/display: Don't fill up the logs
  2022-02-24 22:21 ` Alex Deucher
@ 2022-02-24 22:49   ` Luben Tuikov
  2022-02-25 16:15     ` Li, Roman
  0 siblings, 1 reply; 4+ messages in thread
From: Luben Tuikov @ 2022-02-24 22:49 UTC (permalink / raw)
  To: Alex Deucher
  Cc: Felix Kuehling, Roman Li, amd-gfx list, Daniel Wheeler,
	Hersen Wu, Alex Deucher

I could, but if they enable KMS debug, this prints 100s of times a second.
It literally overflows the log. It needs to be printed "ONCE" in whichever mode.
Either that, or not print it at all--it is "DEBUG" after all.

Regards,
Luben

On 2022-02-24 17:21, Alex Deucher wrote:
> On Thu, Feb 24, 2022 at 4:46 PM Luben Tuikov <luben.tuikov@amd.com> wrote:
>>
>> Don't fill up the logs with:
>>
>> [253557.859575] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
>> [253557.892966] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
>> [253557.926070] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
>> [253557.959344] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC precompute is not needed.
>>
>> which prints many times a second, when the kernel is run with
>> drm.debug=2.
>>
>> Instead of DRM_DEBUG_DRIVER(), make it DRM_INFO_ONCE().
> 
> Maybe convert to DRM_DEBUG_KMS() for consistency with the rest of the
> display code?
> 
> Alex
> 
>>
>> Cc: Alex Deucher <Alexander.Deucher@amd.com>
>> Cc: Roman Li <Roman.Li@amd.com>
>> Cc: Felix Kuehling <felix.kuehling@amd.com>
>> Cc: Hersen Wu <hersenwu@amd.com>
>> Cc: Daniel Wheeler <daniel.wheeler@amd.com>
>> Fixes: 5898243ba7acdb ("drm/amd/display: Add dsc pre-validation in atomic check")
>> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
>> ---
>>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c   | 8 ++++----
>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> index 05573f073b21f7..0542034530b1b0 100644
>> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
>> @@ -1198,11 +1198,11 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>>         struct dc_state *local_dc_state = NULL;
>>
>>         if (!is_dsc_precompute_needed(state)) {
>> -               DRM_DEBUG_DRIVER("DSC precompute is not needed.\n");
>> +               DRM_INFO_ONCE("DSC precompute is not needed.\n");
>>                 return;
>>         }
>>         if (dm_atomic_get_state(state, dm_state_ptr)) {
>> -               DRM_DEBUG_DRIVER("dm_atomic_get_state() failed\n");
>> +               DRM_INFO_ONCE("dm_atomic_get_state() failed\n");
>>                 return;
>>         }
>>         dm_state = *dm_state_ptr;
>> @@ -1245,7 +1245,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>>         }
>>
>>         if (!pre_compute_mst_dsc_configs_for_state(state, local_dc_state, vars)) {
>> -               DRM_DEBUG_DRIVER("pre_compute_mst_dsc_configs_for_state() failed\n");
>> +               DRM_INFO_ONCE("pre_compute_mst_dsc_configs_for_state() failed\n");
>>                 goto clean_exit;
>>         }
>>
>> @@ -1258,7 +1258,7 @@ void pre_validate_dsc(struct drm_atomic_state *state,
>>
>>                 if (local_dc_state->streams[i] &&
>>                     is_timing_changed(stream, local_dc_state->streams[i])) {
>> -                       DRM_DEBUG_DRIVER("crtc[%d] needs mode_changed\n", i);
>> +                       DRM_INFO_ONCE("crtc[%d] needs mode_changed\n", i);
>>                 } else {
>>                         int ind = find_crtc_index_in_state_by_stream(state, stream);
>>
>>
>> base-commit: bff980c7632ef3b0099ba230cf7d5c864db3e1a3
>> --
>> 2.35.1.129.gb80121027d
>>

Regards,
-- 
Luben

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [PATCH] drm/amd/display: Don't fill up the logs
  2022-02-24 22:49   ` Luben Tuikov
@ 2022-02-25 16:15     ` Li, Roman
  0 siblings, 0 replies; 4+ messages in thread
From: Li, Roman @ 2022-02-25 16:15 UTC (permalink / raw)
  To: Tuikov, Luben, Alex Deucher
  Cc: Deucher, Alexander, Kuehling, Felix, Wu, Hersen, Wheeler, Daniel,
	amd-gfx list

[AMD Official Use Only]

Definitely overflowed log makes no sense.
"ONCE" is better than nothing for debugging.
With that said:

Reviewed-by: Roman Li <Roman.Li@amd.com>

> -----Original Message-----
> From: Tuikov, Luben <Luben.Tuikov@amd.com>
> Sent: Thursday, February 24, 2022 5:50 PM
> To: Alex Deucher <alexdeucher@gmail.com>
> Cc: amd-gfx list <amd-gfx@lists.freedesktop.org>; Kuehling, Felix
> <Felix.Kuehling@amd.com>; Li, Roman <Roman.Li@amd.com>; Wu, Hersen
> <hersenxs.wu@amd.com>; Wheeler, Daniel <Daniel.Wheeler@amd.com>;
> Deucher, Alexander <Alexander.Deucher@amd.com>
> Subject: Re: [PATCH] drm/amd/display: Don't fill up the logs
>
> I could, but if they enable KMS debug, this prints 100s of times a second.
> It literally overflows the log. It needs to be printed "ONCE" in whichever mode.
> Either that, or not print it at all--it is "DEBUG" after all.
>
> Regards,
> Luben
>
> On 2022-02-24 17:21, Alex Deucher wrote:
> > On Thu, Feb 24, 2022 at 4:46 PM Luben Tuikov <luben.tuikov@amd.com>
> wrote:
> >>
> >> Don't fill up the logs with:
> >>
> >> [253557.859575] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC
> precompute is not needed.
> >> [253557.892966] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC
> precompute is not needed.
> >> [253557.926070] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC
> precompute is not needed.
> >> [253557.959344] [drm:amdgpu_dm_atomic_check [amdgpu]] DSC
> precompute is not needed.
> >>
> >> which prints many times a second, when the kernel is run with
> >> drm.debug=2.
> >>
> >> Instead of DRM_DEBUG_DRIVER(), make it DRM_INFO_ONCE().
> >
> > Maybe convert to DRM_DEBUG_KMS() for consistency with the rest of the
> > display code?
> >
> > Alex
> >
> >>
> >> Cc: Alex Deucher <Alexander.Deucher@amd.com>
> >> Cc: Roman Li <Roman.Li@amd.com>
> >> Cc: Felix Kuehling <felix.kuehling@amd.com>
> >> Cc: Hersen Wu <hersenwu@amd.com>
> >> Cc: Daniel Wheeler <daniel.wheeler@amd.com>
> >> Fixes: 5898243ba7acdb ("drm/amd/display: Add dsc pre-validation in
> >> atomic check")
> >> Signed-off-by: Luben Tuikov <luben.tuikov@amd.com>
> >> ---
> >>  .../gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c   | 8 ++++-
> ---
> >>  1 file changed, 4 insertions(+), 4 deletions(-)
> >>
> >> diff --git
> >> a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> >> b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> >> index 05573f073b21f7..0542034530b1b0 100644
> >> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> >> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_mst_types.c
> >> @@ -1198,11 +1198,11 @@ void pre_validate_dsc(struct drm_atomic_state
> *state,
> >>         struct dc_state *local_dc_state = NULL;
> >>
> >>         if (!is_dsc_precompute_needed(state)) {
> >> -               DRM_DEBUG_DRIVER("DSC precompute is not needed.\n");
> >> +               DRM_INFO_ONCE("DSC precompute is not needed.\n");
> >>                 return;
> >>         }
> >>         if (dm_atomic_get_state(state, dm_state_ptr)) {
> >> -               DRM_DEBUG_DRIVER("dm_atomic_get_state() failed\n");
> >> +               DRM_INFO_ONCE("dm_atomic_get_state() failed\n");
> >>                 return;
> >>         }
> >>         dm_state = *dm_state_ptr;
> >> @@ -1245,7 +1245,7 @@ void pre_validate_dsc(struct drm_atomic_state
> *state,
> >>         }
> >>
> >>         if (!pre_compute_mst_dsc_configs_for_state(state, local_dc_state,
> vars)) {
> >> -
> DRM_DEBUG_DRIVER("pre_compute_mst_dsc_configs_for_state() failed\n");
> >> +
> >> + DRM_INFO_ONCE("pre_compute_mst_dsc_configs_for_state() failed\n");
> >>                 goto clean_exit;
> >>         }
> >>
> >> @@ -1258,7 +1258,7 @@ void pre_validate_dsc(struct drm_atomic_state
> >> *state,
> >>
> >>                 if (local_dc_state->streams[i] &&
> >>                     is_timing_changed(stream, local_dc_state->streams[i])) {
> >> -                       DRM_DEBUG_DRIVER("crtc[%d] needs mode_changed\n", i);
> >> +                       DRM_INFO_ONCE("crtc[%d] needs
> >> + mode_changed\n", i);
> >>                 } else {
> >>                         int ind =
> >> find_crtc_index_in_state_by_stream(state, stream);
> >>
> >>
> >> base-commit: bff980c7632ef3b0099ba230cf7d5c864db3e1a3
> >> --
> >> 2.35.1.129.gb80121027d
> >>
>
> Regards,
> --
> Luben

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-02-25 16:15 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-02-24 21:45 [PATCH] drm/amd/display: Don't fill up the logs Luben Tuikov
2022-02-24 22:21 ` Alex Deucher
2022-02-24 22:49   ` Luben Tuikov
2022-02-25 16:15     ` Li, Roman

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.