From: Aric Cyr <[email protected]>

[why]
In dc_post_update_surfaces_to_stream flip pending is checked, but HW
could be in IPS.  Accessing it could lead to a hang.

[how]
Enforce exiting IPS before touching hardware.

Cc: Nicholas Kazlauskas <[email protected]>
Signed-off-by: Aric Cyr <[email protected]>
Signed-off-by: Wayne Lin <[email protected]>
---
 drivers/gpu/drm/amd/display/dc/core/dc.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c 
b/drivers/gpu/drm/amd/display/dc/core/dc.c
index 85de12c558ad..fd382363a0ea 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc.c
@@ -2850,6 +2850,8 @@ void dc_post_update_surfaces_to_stream(struct dc *dc)
        else {
                TRACE_DCN_CLOCK_STATE(&context->bw_ctx.bw.dcn.clk);
 
+               dc_exit_ips_for_hw_access(dc);
+
                if (is_flip_pending_in_pipes(dc, context))
                        return;
 
-- 
2.43.0

Reply via email to