]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: fix odm pipe copy
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 2 Aug 2019 20:32:13 +0000 (16:32 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Aug 2019 16:42:25 +0000 (11:42 -0500)
ODM next and prev pipe were missing from dc_copy_state

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Nikola Cornij <Nikola.Cornij@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.c
drivers/gpu/drm/amd/display/dc/core/dc_link_dp.c

index 84f12e13c900bdc33a27c3050b20ad5df9c740be..b0ae9d2aad0ec50bd9aba136a64778ab839d6728 100644 (file)
@@ -1230,6 +1230,12 @@ struct dc_state *dc_copy_state(struct dc_state *src_ctx)
                        if (cur_pipe->bottom_pipe)
                                cur_pipe->bottom_pipe = &new_ctx->res_ctx.pipe_ctx[cur_pipe->bottom_pipe->pipe_idx];
 
+                       if (cur_pipe->prev_odm_pipe)
+                               cur_pipe->prev_odm_pipe =  &new_ctx->res_ctx.pipe_ctx[cur_pipe->prev_odm_pipe->pipe_idx];
+
+                       if (cur_pipe->next_odm_pipe)
+                               cur_pipe->next_odm_pipe = &new_ctx->res_ctx.pipe_ctx[cur_pipe->next_odm_pipe->pipe_idx];
+
        }
 
        for (i = 0; i < new_ctx->stream_count; i++) {
index 40067403b043f9a9482b241c8c58b428eaad4d3a..f5742719b5d9b6951acc773cd268e56d51fa9d96 100644 (file)
@@ -3188,7 +3188,7 @@ bool dc_link_dp_set_test_pattern(
        memset(&training_pattern, 0, sizeof(training_pattern));
 
        for (i = 0; i < MAX_PIPES; i++) {
-               if (pipes[i].stream->link == link) {
+               if (pipes[i].stream->link == link && !pipes[i].top_pipe && !pipes[i].prev_odm_pipe) {
                        pipe_ctx = &pipes[i];
                        break;
                }