stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] drm/amd/display: Restore backlight brightness after system resume
@ 2019-09-02  8:33 Kai-Heng Feng
  2019-09-17 12:32 ` Alex Deucher
  0 siblings, 1 reply; 2+ messages in thread
From: Kai-Heng Feng @ 2019-09-02  8:33 UTC (permalink / raw)
  To: harry.wentland, sunpeng.li, alexander.deucher, christian.koenig,
	David1.Zhou
  Cc: amd-gfx, dri-devel, linux-kernel, Kai-Heng Feng, stable

Laptops with AMD APU doesn't restore display backlight brightness after
system resume.

This issue started when DC was introduced.

Let's use BL_CORE_SUSPENDRESUME so the backlight core calls
update_status callback after system resume to restore the backlight
level.

Tested on Dell Inspiron 3180 (Stoney Ridge) and Dell Latitude 5495
(Raven Ridge).

Cc: <stable@vger.kernel.org>
Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
---
 drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
 1 file changed, 1 insertion(+)

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 1b0949dd7808..183ef18ac6f3 100644
--- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
+++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
@@ -2111,6 +2111,7 @@ static int amdgpu_dm_backlight_get_brightness(struct backlight_device *bd)
 }
 
 static const struct backlight_ops amdgpu_dm_backlight_ops = {
+	.options = BL_CORE_SUSPENDRESUME,
 	.get_brightness = amdgpu_dm_backlight_get_brightness,
 	.update_status	= amdgpu_dm_backlight_update_status,
 };
-- 
2.17.1


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

* Re: [PATCH] drm/amd/display: Restore backlight brightness after system resume
  2019-09-02  8:33 [PATCH] drm/amd/display: Restore backlight brightness after system resume Kai-Heng Feng
@ 2019-09-17 12:32 ` Alex Deucher
  0 siblings, 0 replies; 2+ messages in thread
From: Alex Deucher @ 2019-09-17 12:32 UTC (permalink / raw)
  To: Kai-Heng Feng
  Cc: Wentland, Harry, Leo (Sunpeng) Li, Deucher, Alexander,
	Christian Koenig, Chunming Zhou, for 3.8,
	Maling list - DRI developers, amd-gfx list, LKML

Applied.  Thanks!

Alex

On Mon, Sep 2, 2019 at 4:16 PM Kai-Heng Feng
<kai.heng.feng@canonical.com> wrote:
>
> Laptops with AMD APU doesn't restore display backlight brightness after
> system resume.
>
> This issue started when DC was introduced.
>
> Let's use BL_CORE_SUSPENDRESUME so the backlight core calls
> update_status callback after system resume to restore the backlight
> level.
>
> Tested on Dell Inspiron 3180 (Stoney Ridge) and Dell Latitude 5495
> (Raven Ridge).
>
> Cc: <stable@vger.kernel.org>
> Signed-off-by: Kai-Heng Feng <kai.heng.feng@canonical.com>
> ---
>  drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c | 1 +
>  1 file changed, 1 insertion(+)
>
> 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 1b0949dd7808..183ef18ac6f3 100644
> --- a/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> +++ b/drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c
> @@ -2111,6 +2111,7 @@ static int amdgpu_dm_backlight_get_brightness(struct backlight_device *bd)
>  }
>
>  static const struct backlight_ops amdgpu_dm_backlight_ops = {
> +       .options = BL_CORE_SUSPENDRESUME,
>         .get_brightness = amdgpu_dm_backlight_get_brightness,
>         .update_status  = amdgpu_dm_backlight_update_status,
>  };
> --
> 2.17.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

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

end of thread, other threads:[~2019-09-17 12:32 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-02  8:33 [PATCH] drm/amd/display: Restore backlight brightness after system resume Kai-Heng Feng
2019-09-17 12:32 ` Alex Deucher

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).