summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSivapiriyanKumarasamy2019-06-14 21:04:00 +0200
committerGreg Kroah-Hartman2019-08-16 10:12:44 +0200
commit2a5e21adc71b46beec9232cc6418676fd2255bc5 (patch)
treeb3056777a39ae5aea69ee4e53048f4d20a8e2392
parentscripts/sphinx-pre-install: fix script for RHEL/CentOS (diff)
downloadkernel-qcow2-linux-2a5e21adc71b46beec9232cc6418676fd2255bc5.tar.gz
kernel-qcow2-linux-2a5e21adc71b46beec9232cc6418676fd2255bc5.tar.xz
kernel-qcow2-linux-2a5e21adc71b46beec9232cc6418676fd2255bc5.zip
drm/amd/display: Wait for backlight programming completion in set backlight level
[ Upstream commit c7990daebe71d11a9e360b5c3b0ecd1846a3a4bb ] [WHY] Currently we don't wait for blacklight programming completion in DMCU when setting backlight level. Some sequences such as PSR static screen event trigger reprogramming requires it to be complete. [How] Add generic wait for dmcu command completion in set backlight level. Signed-off-by: SivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com> Reviewed-by: Anthony Koo <Anthony.Koo@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce/dce_abm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
index 070ab56a8aca..da8b198538e5 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
@@ -242,6 +242,10 @@ static void dmcu_set_backlight_level(
s2 |= (level << ATOM_S2_CURRENT_BL_LEVEL_SHIFT);
REG_WRITE(BIOS_SCRATCH_2, s2);
+
+ /* waitDMCUReadyForCmd */
+ REG_WAIT(MASTER_COMM_CNTL_REG, MASTER_COMM_INTERRUPT,
+ 0, 1, 80000);
}
static void dce_abm_init(struct abm *abm)