summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
diff options
context:
space:
mode:
authorWenjing Liu <wenjing.liu@amd.com>2023-08-28 15:43:03 -0400
committerAlex Deucher <alexander.deucher@amd.com>2023-09-26 17:00:21 -0400
commit177ea58bef72ee84d8c692950ba51889478a7d15 (patch)
tree542d74d618fe341cdf69fff9f0e35d4ab6d8c1b3 /drivers/gpu/drm/amd/display/dc/core/dc_resource.c
parent036cf278a8257b391b4f5b919ddc668c9b1ce9a7 (diff)
drm/amd/display: reset stream slice count for new ODM policy
[why] 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. [how] reset ODM slice count when all planes are removed. Reviewed-by: Aric Cyr <aric.cyr@amd.com> Acked-by: Wayne Lin <wayne.lin@amd.com> Signed-off-by: Wenjing Liu <wenjing.liu@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc_resource.c')
-rw-r--r--drivers/gpu/drm/amd/display/dc/core/dc_resource.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
index 5810cf78cf29..436892450936 100644
--- a/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
+++ b/drivers/gpu/drm/amd/display/dc/core/dc_resource.c
@@ -2874,6 +2874,15 @@ bool dc_remove_plane_from_context(
stream_status->plane_states[stream_status->plane_count] = NULL;
+ 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(
+ context, dc->current_state, dc->res_pool, stream, 1);
+
return true;
}