OSDN Git Service

drm/amd/display: Disconnect DCN2 mpcc when changing tg
authorLeo Li <sunpeng.li@amd.com>
Fri, 15 Mar 2019 17:50:26 +0000 (13:50 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Sat, 22 Jun 2019 14:34:08 +0000 (09:34 -0500)
A previous fix was done for DCN1 that needed to be ported to DCN2:
commit 60c677534e73 ("drm/amd/display: Disconnect mpcc when changing tg")

Signed-off-by: Leo Li <sunpeng.li@amd.com>
Acked-by: Hawking Zhang <Hawking.Zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn20/dcn20_hwseq.c

index f6e25f7..f2e5e49 100644 (file)
@@ -1323,9 +1323,10 @@ static void dcn20_apply_ctx_for_surface(
                        }
                }
 
-               if (!pipe_ctx->plane_state &&
-                       old_pipe_ctx->plane_state &&
-                       old_pipe_ctx->stream_res.tg == tg) {
+               if ((!pipe_ctx->plane_state ||
+                    pipe_ctx->stream_res.tg != old_pipe_ctx->stream_res.tg) &&
+                    old_pipe_ctx->plane_state &&
+                    old_pipe_ctx->stream_res.tg == tg) {
 
                        dc->hwss.plane_atomic_disconnect(dc, old_pipe_ctx);
                        removed_pipe[i] = true;