OSDN Git Service

drm/amd/display: fix pipe re-assignment when odm present
authorDmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Fri, 6 Sep 2019 15:12:14 +0000 (11:12 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 11 Oct 2019 00:25:06 +0000 (19:25 -0500)
Currently pipe split may steal an existing ODM pipe depending on stream
sequence. This change prevents that from happening as easily.

Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Gary Kattan <Gary.Kattan@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/dcn20/dcn20_resource.c

index f2a0ca0..b09c3d1 100644 (file)
@@ -2202,7 +2202,8 @@ static struct pipe_ctx *dcn20_find_secondary_pipe(struct dc *dc,
                 */
                if (secondary_pipe == NULL) {
                        for (j = dc->res_pool->pipe_count - 1; j >= 0; j--) {
-                               if (dc->current_state->res_ctx.pipe_ctx[j].top_pipe == NULL) {
+                               if (dc->current_state->res_ctx.pipe_ctx[j].top_pipe == NULL
+                                               && dc->current_state->res_ctx.pipe_ctx[j].prev_odm_pipe == NULL) {
                                        preferred_pipe_idx = j;
 
                                        if (res_ctx->pipe_ctx[preferred_pipe_idx].stream == NULL) {