[PATCH] amd/display: downgrade validation failure log level

Alex Deucher alexdeucher at gmail.com
Tue Sep 7 17:03:32 UTC 2021


Applied.  Thanks!

Alex

On Tue, Sep 7, 2021 at 10:21 AM Kazlauskas, Nicholas
<nicholas.kazlauskas at amd.com> wrote:
>
> On 2021-09-07 10:19 a.m., Simon Ser wrote:
> > In amdgpu_dm_atomic_check, dc_validate_global_state is called. On
> > failure this logs a warning to the kernel journal. However warnings
> > shouldn't be used for atomic test-only commit failures: user-space
> > might be perfoming a lot of atomic test-only commits to find the
> > best hardware configuration.
> >
> > Downgrade the log to a regular DRM atomic message. While at it, use
> > the new device-aware logging infrastructure.
> >
> > This fixes error messages in the kernel when running gamescope [1].
> >
> > [1]: https://github.com/Plagman/gamescope/issues/245
> >
> > Signed-off-by: Simon Ser <contact at emersion.fr>
> > Cc: Alex Deucher <alexander.deucher at amd.com>
> > Cc: Harry Wentland <hwentlan at amd.com>
> > Cc: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
>
> Makes sense since validation can fail. Thanks for the patch!
>
> Reviewed-by: Nicholas Kazlauskas <nicholas.kazlauskas at amd.com>
>
> Regards,
> Nicholas Kazlauskas
>
> > ---
> >   drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > 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 986c9d29d686..6f3b6f2a952c 100644
> > --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> > @@ -10467,7 +10467,8 @@ static int amdgpu_dm_atomic_check(struct drm_device *dev,
> >                       goto fail;
> >               status = dc_validate_global_state(dc, dm_state->context, false);
> >               if (status != DC_OK) {
> > -                     DC_LOG_WARNING("DC global validation failure: %s (%d)",
> > +                     drm_dbg_atomic(dev,
> > +                                    "DC global validation failure: %s (%d)",
> >                                      dc_status_to_str(status), status);
> >                       ret = -EINVAL;
> >                       goto fail;
> >
>


More information about the amd-gfx mailing list