[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <YxeoX5dikxsUjzJS@phenom.ffwll.local>
Date: Tue, 6 Sep 2022 22:06:55 +0200
From: Daniel Vetter <daniel@...ll.ch>
To: Takashi Iwai <tiwai@...e.de>
Cc: Thomas Zimmermann <tzimmermann@...e.de>,
linux-kernel@...r.kernel.org, dri-devel@...ts.freedesktop.org
Subject: Re: [PATCH 01/12] drm/udl: Restore display mode on resume
On Tue, Aug 16, 2022 at 05:36:44PM +0200, Takashi Iwai wrote:
> From: Thomas Zimmermann <tzimmermann@...e.de>
>
> Restore the display mode whne resuming from suspend. Currently, the
> display remains dark.
>
> On resume, the CRTC's mode does not change, but the 'active' flag
> changes to 'true'. Taking this into account when considering a mode
> switch restores the display mode.
>
> The bug is reproducable by using Gnome with udl and observing the
> adapter's suspend/resume behavior.
>
> Signed-off-by: Thomas Zimmermann <tzimmermann@...e.de>
> Signed-off-by: Takashi Iwai <tiwai@...e.de>
This patch isn't great and incomplete, see
https://lore.kernel.org/dri-devel/YxegiQFAv+OWjjqE@phenom.ffwll.local/
You need cc: stable and fixes: 997d33c35618 and actually just remove the
entire check :-)
-Daniel
> ---
> drivers/gpu/drm/udl/udl_modeset.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/udl/udl_modeset.c b/drivers/gpu/drm/udl/udl_modeset.c
> index 169110d8fc2e..df987644fb5d 100644
> --- a/drivers/gpu/drm/udl/udl_modeset.c
> +++ b/drivers/gpu/drm/udl/udl_modeset.c
> @@ -8,6 +8,7 @@
> * Copyright (C) 2009 Bernie Thompson <bernie@...gable.com>
> */
>
> +#include <drm/drm_atomic.h>
> #include <drm/drm_atomic_helper.h>
> #include <drm/drm_crtc_helper.h>
> #include <drm/drm_damage_helper.h>
> @@ -382,7 +383,7 @@ udl_simple_display_pipe_enable(struct drm_simple_display_pipe *pipe,
>
> udl_handle_damage(fb, &shadow_plane_state->data[0], 0, 0, fb->width, fb->height);
>
> - if (!crtc_state->mode_changed)
> + if (!drm_atomic_crtc_needs_modeset(crtc_state))
> return;
>
> /* enable display */
> --
> 2.35.3
>
--
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch
Powered by blists - more mailing lists