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>
                         * 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 {
                                dc->res_pool->funcs->remove_stream_from_ctx(dc, new_ctx, stream);
 
                        memset(del_pipe, 0, sizeof(*del_pipe));
-
-                       break;
                }
        }