Skip to content

Commit 81901d8

Browse files
Wenjing Liualexdeucher
authored andcommitted
drm/amd/display: always reset ODM mode in context when adding first plane
[why] In current implemenation ODM mode is only reset when the last plane is removed from dc state. For any dc validate we will always remove all current planes and add new planes. However when switching from no planes to 1 plane, ODM mode is not reset because no planes get removed. This has caused an issue where we kept ODM combine when it should have been remove when a plane is added. The change is to reset ODM mode when adding the first plane. Cc: [email protected] Reviewed-by: Alvin Lee <[email protected]> Acked-by: Hamza Mahfooz <[email protected]> Signed-off-by: Wenjing Liu <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent bbca7f4 commit 81901d8

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

drivers/gpu/drm/amd/display/dc/core/dc_state.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -436,6 +436,15 @@ bool dc_state_add_plane(
436436
goto out;
437437
}
438438

439+
if (stream_status->plane_count == 0 && dc->config.enable_windowed_mpo_odm)
440+
/* ODM combine could prevent us from supporting more planes
441+
* we will reset ODM slice count back to 1 when all planes have
442+
* been removed to maximize the amount of planes supported when
443+
* new planes are added.
444+
*/
445+
resource_update_pipes_for_stream_with_slice_count(
446+
state, dc->current_state, dc->res_pool, stream, 1);
447+
439448
otg_master_pipe = resource_get_otg_master_for_stream(
440449
&state->res_ctx, stream);
441450
if (otg_master_pipe)

0 commit comments

Comments
 (0)