summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonathan Gray <jsg@cvs.openbsd.org>2019-08-17 08:11:33 +0000
committerJonathan Gray <jsg@cvs.openbsd.org>2019-08-17 08:11:33 +0000
commitedbe36acaf4951d7cab697800cc75cd5696357ba (patch)
treeb8b4bdd4b9f63339bb36611ed8d245decc215302
parent4c9a1f2cf0dcad85f9c74e32303ce5fabaa94d5b (diff)
drm/amd/display: Wait for backlight programming completion in set backlight level
From Sivapiriyan Kumarasamy 2a5e21adc71b46beec9232cc6418676fd2255bc5 in linux 4.19.y/4.19.67 c7990daebe71d11a9e360b5c3b0ecd1846a3a4bb in mainline linux
-rw-r--r--sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c b/sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
index 070ab56a8ac..da8b198538e 100644
--- a/sys/dev/pci/drm/amd/display/dc/dce/dce_abm.c
+++ b/sys/dev/pci/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)