Skip to content

Commit a2020be

Browse files
superm1alexdeucher
authored andcommitted
drm/amd/display: Restore guard against default backlight value < 1 nit
Mark reports that brightness is not restored after Xorg dpms screen blank. This behavior was introduced by commit d9e8658 ("drm/amd/display: Simplify brightness initialization") which dropped the cached backlight value in display code, but also removed code for when the default value read back was less than 1 nit. Restore this code so that the backlight brightness is restored to the correct default value in this circumstance. Reported-by: Mark Herbert <[email protected]> Closes: https://gitlab.freedesktop.org/drm/amd/-/issues/3031 Cc: [email protected] Cc: Camille Cho <[email protected]> Cc: Krunoslav Kovac <[email protected]> Cc: Hamza Mahfooz <[email protected]> Fixes: d9e8658 ("drm/amd/display: Simplify brightness initialization") Acked-by: Alex Deucher <[email protected]> Signed-off-by: Mario Limonciello <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 0497ae6 commit a2020be

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/gpu/drm/amd/display/dc/link/protocols/link_edp_panel_control.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -287,8 +287,8 @@ bool set_default_brightness_aux(struct dc_link *link)
287287
if (link && link->dpcd_sink_ext_caps.bits.oled == 1) {
288288
if (!read_default_bl_aux(link, &default_backlight))
289289
default_backlight = 150000;
290-
// if > 5000, it might be wrong readback
291-
if (default_backlight > 5000000)
290+
// if < 1 nits or > 5000, it might be wrong readback
291+
if (default_backlight < 1000 || default_backlight > 5000000)
292292
default_backlight = 150000;
293293

294294
return edp_set_backlight_level_nits(link, true,

0 commit comments

Comments
 (0)