Commit 177ea58b authored by Wenjing Liu's avatar Wenjing Liu Committed by Alex Deucher
Browse files

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: default avatarAric Cyr <aric.cyr@amd.com>
Acked-by: default avatarWayne Lin <wayne.lin@amd.com>
Signed-off-by: default avatarWenjing Liu <wenjing.liu@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 036cf278
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -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;
}