drm/amd/display: fix odm combine pipe reset
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 8 Mar 2019 21:44:53 +0000 (16:44 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Thu, 21 Mar 2019 04:39:48 +0000 (23:39 -0500)
We fail to reset the second odm combine pipe. This change fixes
odm pointer management.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/core/dc_resource.c

index ec0e2ad5f1c316c975b1f7fb0dcff3b92e80b1eb..13f99b11aaa6f0d2d7156e03e4a2f0c466ce56f3 100644 (file)
@@ -1293,9 +1293,9 @@ bool dc_remove_plane_from_context(
                         * For head pipe detach surfaces from pipe for tail
                         * pipe just zero it out
                         */
-                       if (!pipe_ctx->top_pipe ||
-                               (!pipe_ctx->top_pipe->top_pipe &&
+                       if (!pipe_ctx->top_pipe || (!pipe_ctx->top_pipe->top_pipe &&
                                        pipe_ctx->top_pipe->stream_res.opp != pipe_ctx->stream_res.opp)) {
+                               pipe_ctx->top_pipe = NULL;
                                pipe_ctx->plane_state = NULL;
                                pipe_ctx->bottom_pipe = NULL;
                        } else {
@@ -1727,8 +1727,6 @@ enum dc_status dc_remove_stream_from_ctx(
                                dc->res_pool->funcs->remove_stream_from_ctx(dc, new_ctx, stream);
 
                        memset(del_pipe, 0, sizeof(*del_pipe));
-
-                       break;
                }
        }