From: Charlene Liu <[email protected]>

Signed-off-by: Charlene Liu <[email protected]>
Reviewed-by: Tony Cheng <[email protected]>
Acked-by: Harry Wentland <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c 
b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
index f663adb33584..48e21ead3142 100644
--- a/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
+++ b/drivers/gpu/drm/amd/display/dc/dce/dce_dmcu.c
@@ -521,6 +521,9 @@ static void dcn10_dmcu_set_psr_enable(struct dmcu *dmcu, 
bool enable, bool wait)
        if (dmcu->dmcu_state != DMCU_RUNNING)
                return;
 
+       dcn10_get_dmcu_psr_state(dmcu, &psr_state);
+       if (psr_state == 0 && !enable)
+               return;
        /* waitDMCUReadyForCmd */
        REG_WAIT(MASTER_COMM_CNTL_REG, MASTER_COMM_INTERRUPT, 0,
                                dmcu_wait_reg_ready_interval,
-- 
2.14.1

_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx

Reply via email to