* [PATCH] drm/amd/display: Restore backlight brightness after system resume
@ 2019-09-02 8:33 Kai-Heng Feng
2019-09-02 17:58 ` Sasha Levin
2019-09-17 12:32 ` Alex Deucher
0 siblings, 2 replies; 3+ 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] 3+ 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-02 17:58 ` Sasha Levin
2019-09-17 12:32 ` Alex Deucher
1 sibling, 0 replies; 3+ messages in thread
From: Sasha Levin @ 2019-09-02 17:58 UTC (permalink / raw)
To: Sasha Levin, Kai-Heng Feng, harry.wentland, sunpeng.li
Cc: stable, dri-devel, amd-gfx
Hi,
[This is an automated email]
This commit has been processed because it contains a -stable tag.
The stable tag indicates that it's relevant for the following trees: all
The bot has tested the following trees: v5.2.11, v4.19.69, v4.14.141, v4.9.190, v4.4.190.
v5.2.11: Build OK!
v4.19.69: Build OK!
v4.14.141: Failed to apply! Possible dependencies:
1b0c0f9dc5ca ("drm/amdgpu: move userptr BOs to CPU domain during CS v2")
1ed3d2567c80 ("drm/amdgpu: keep the MMU lock until the update ends v4")
3fe89771cb0a ("drm/amdgpu: stop reserving the BO in the MMU callback v3")
4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
60de1c1740f3 ("drm/amdgpu: use a rw_semaphore for MMU notifiers")
9a18999640fa ("drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h")
9cca0b8e5df0 ("drm/amdgpu: move amdgpu_cs_sysvm_access_required into find_mapping")
a216ab09955d ("drm/amdgpu: fix userptr put_page handling")
b72cf4fca2bb ("drm/amdgpu: move taking mmap_sem into get_user_pages v2")
ca666a3c298f ("drm/amdgpu: stop using BO status for user pages")
v4.9.190: Failed to apply! Possible dependencies:
1cec20f0ea0e ("dma-buf: Restart reservation_object_wait_timeout_rcu() after writes")
3fe89771cb0a ("drm/amdgpu: stop reserving the BO in the MMU callback v3")
4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
4df654d293c6 ("drm/amdgpu: move amdgpu_uvd structure to uvd header")
5e5681788bef ("drm/amdgpu: move amdgpu_vce structure to vce header")
660e855813f7 ("amdgpu: use drm sync objects for shared semaphores (v6)")
78010cd9736e ("dma-buf/fence: add an lockdep_assert_held()")
95aa13f6b196 ("drm/amdgpu: move amdgpu_vcn structure to vcn header")
95d0906f8506 ("drm/amdgpu: add initial vcn support and decode tests")
9a18999640fa ("drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h")
b636922553ee ("drm/amdgpu: only move VM BOs in the LRU during validation v2")
b72cf4fca2bb ("drm/amdgpu: move taking mmap_sem into get_user_pages v2")
f54d1867005c ("dma-buf: Rename struct fence to dma_fence")
fedf54132d24 ("dma-buf: Restart reservation_object_get_fences_rcu() after writes")
v4.4.190: Failed to apply! Possible dependencies:
1f7371b2a5fa ("drm/amd/powerplay: add basic powerplay framework")
288912cb95d1 ("drm/amdgpu: use $(src) in Makefile (v2)")
37cd0ca204a5 ("drm/amdgpu: unify AMDGPU_CTX_MAX_CS_PENDING and amdgpu_sched_jobs")
3c0eea6c35d9 ("drm/amdgpu: put VM page tables directly into duplicates list")
3f99dd814a6f ("drm/amdgpu: save and restore UVD context with suspend and resume")
4325198180e5 ("drm/amdgpu: remove GART page addr array")
4562236b3bc0 ("drm/amd/dc: Add dc display driver (v2)")
4acabfe3793e ("drm/amdgpu: fix num_ibs check")
4df654d293c6 ("drm/amdgpu: move amdgpu_uvd structure to uvd header")
50838c8cc413 ("drm/amdgpu: add proper job alloc/free functions")
56467ebfb254 ("drm/amdgpu: split VM PD and PT handling during CS")
5e5681788bef ("drm/amdgpu: move amdgpu_vce structure to vce header")
7270f8391df1 ("drm/amdgpu: add amdgpu_set_ib_value helper (v2)")
95aa13f6b196 ("drm/amdgpu: move amdgpu_vcn structure to vcn header")
9a18999640fa ("drm/amdgpu: move MMU notifier related defines to amdgpu_mn.h")
a1d29476d666 ("drm/amdgpu: optionally enable GART debugfs file")
a8fe58cec351 ("drm/amd: add ACP driver support")
c036554170fc ("drm/amdgpu: handle more than 10 UVD sessions (v2)")
c3cca41e6249 ("drm/amdgpu: cleanup amdgpu_cs_parser structure")
cadf97b196a1 ("drm/amdgpu: clean up non-scheduler code path (v2)")
cd75dc6887f1 ("drm/amdgpu: separate pushing CS to scheduler")
d71518b5aa7c ("drm/amdgpu: cleanup in kernel job submission")
d7af97dbccf0 ("drm/amdgpu: send UVD IB tests directly to the ring again")
d8e0cae64550 ("drm/amdgpu: validate duplicates first")
f69f90a113f2 ("drm/amdgpu: fix amdgpu_cs_get_threshold_for_moves handling")
fdba11f4079e ("drm/amdgpu: move all Kconfig options to amdgpu/Kconfig")
NOTE: The patch will not be queued to stable trees until it is upstream.
How should we proceed with this patch?
--
Thanks,
Sasha
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ 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-02 17:58 ` Sasha Levin
@ 2019-09-17 12:32 ` Alex Deucher
1 sibling, 0 replies; 3+ 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] 3+ messages in thread
end of thread, other threads:[~2019-09-17 12:32 UTC | newest]
Thread overview: 3+ 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-02 17:58 ` Sasha Levin
2019-09-17 12:32 ` Alex Deucher
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.