Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

drm/amd/display: change hw sequence

[Why]
t9 delay func is called twice after setting power off, the unexpected
action results in a doubling of the added 140ms t9 delay

[How]
If the backlight has been turned off, does not turn it off again

Signed-off-by: Sherry <Yao.Wang1@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>

authored by

Sherry and committed by
Alex Deucher
014427ad 2208f39c

+8 -5
+8 -5
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
··· 939 939 return; 940 940 } 941 941 942 - if (enable && link->panel_cntl && 943 - link->panel_cntl->funcs->is_panel_backlight_on(link->panel_cntl)) { 944 - DC_LOG_HW_RESUME_S3( 945 - "%s: panel already powered up. Do nothing.\n", 942 + if (link->panel_cntl) { 943 + bool is_backlight_on = link->panel_cntl->funcs->is_panel_backlight_on(link->panel_cntl); 944 + 945 + if ((enable && is_backlight_on) || (!enable && !is_backlight_on)) { 946 + DC_LOG_HW_RESUME_S3( 947 + "%s: panel already powered up/off. Do nothing.\n", 946 948 __func__); 947 - return; 949 + return; 950 + } 948 951 } 949 952 950 953 /* Send VBIOS command to control eDP panel backlight */