]> git.itanic.dy.fi Git - linux-stable/blobdiff - drivers/gpu/drm/amd/display/dc/core/dc_state.c
drm/amd/display: always reset ODM mode in context when adding first plane
[linux-stable] / drivers / gpu / drm / amd / display / dc / core / dc_state.c
index 5cc7f8da209c599f7585e8f10e499ef2118f34ff..61986e5cb491967643b61832c8e35dd7a4818d41 100644 (file)
@@ -436,6 +436,15 @@ bool dc_state_add_plane(
                goto out;
        }
 
+       if (stream_status->plane_count == 0 && dc->config.enable_windowed_mpo_odm)
+               /* ODM combine could prevent us from supporting more planes
+                * we will reset ODM slice count back to 1 when all planes have
+                * been removed to maximize the amount of planes supported when
+                * new planes are added.
+                */
+               resource_update_pipes_for_stream_with_slice_count(
+                               state, dc->current_state, dc->res_pool, stream, 1);
+
        otg_master_pipe = resource_get_otg_master_for_stream(
                        &state->res_ctx, stream);
        if (otg_master_pipe)