drm/amd/display: Fix brightness level not retained over reboot
authorTom Chung <chiahsuan.chung@amd.com>
Wed, 9 Oct 2024 09:09:38 +0000 (17:09 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 4 Nov 2024 17:43:03 +0000 (12:43 -0500)
commit4f26c95ffc21a91281429ed60180619bae19ae92
tree0f2a0e81f7a83f96b3457a4baba9614df903c7ec
parent59b723cd2adbac2a34fc8e12c74ae26ae45bf230
drm/amd/display: Fix brightness level not retained over reboot

[Why]
During boot up and resume the DC layer will reset the panel
brightness to fix a flicker issue.

It will cause the dm->actual_brightness is not the current panel
brightness level. (the dm->brightness is the correct panel level)

[How]
Set the backlight level after do the set mode.

Cc: Mario Limonciello <mario.limonciello@amd.com>
Cc: Alex Deucher <alexander.deucher@amd.com>
Fixes: d9e865826c20 ("drm/amd/display: Simplify brightness initialization")
Reported-by: Mark Herbert <mark.herbert42@gmail.com>
Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3655
Reviewed-by: Sun peng Li <sunpeng.li@amd.com>
Signed-off-by: Tom Chung <chiahsuan.chung@amd.com>
Signed-off-by: Zaeem Mohamed <zaeem.mohamed@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
(cherry picked from commit 7875afafba84817b791be6d2282b836695146060)
Cc: stable@vger.kernel.org
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c