summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd
diff options
context:
space:
mode:
authorSivapiriyanKumarasamy <sivapiriyan.kumarasamy@amd.com>2019-06-14 15:04:00 -0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2019-08-16 10:11:01 +0200
commit26341f1139404362785132fe9ce7f3dc86a85992 (patch)
tree07d3343664582ee078a25d6f6b60d4f41293ccdf /drivers/gpu/drm/amd
parent98d0152c2da000d48d78458874abf259a80d0c4c (diff)
downloadlinux-stable-26341f1139404362785132fe9ce7f3dc86a85992.tar.gz
linux-stable-26341f1139404362785132fe9ce7f3dc86a85992.tar.bz2
linux-stable-26341f1139404362785132fe9ce7f3dc86a85992.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>
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 2959c3c9390b..da30ae04e82b 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_abm.c
@@ -234,6 +234,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)