summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>2019-06-14 21:04:00 +0200
committerAlex Deucher <alexander.deucher@amd.com>2019-07-18 21:17:19 +0200
commitc7990daebe71d11a9e360b5c3b0ecd1846a3a4bb (patch)
tree2c231082eaab1c461508636342f77ab7832420d9 /drivers/gpu/drm/amd
parentdrm/amd/display: Poll for GPUVM context ready (v2) (diff)
downloadlinux-c7990daebe71d11a9e360b5c3b0ecd1846a3a4bb.tar.xz
linux-c7990daebe71d11a9e360b5c3b0ecd1846a3a4bb.zip
drm/amd/display: Wait for backlight programming completion in set backlight level
[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>
Diffstat (limited to 'drivers/gpu/drm/amd')
-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 f8903bcabe49..58bd131d5b48 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
@@ -239,6 +239,10 @@ static void dmcu_set_backlight_level(
s2 |= (backlight_8_bit << 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)