Commit 37415845 authored by Dillon Varone's avatar Dillon Varone Committed by Alex Deucher

drm/amd/display: Add minimal pipe split transition state

[WHY?] When adding/removng a plane to some configurations,
unsupported pipe programming can occur when moving to a new plane.

[HOW?]
Add a safe transistion state before programming new configuration.
Reviewed-by: default avatarAric Cyr <Aric.Cyr@amd.com>
Acked-by: default avatarAlan Liu <HaoPing.Liu@amd.com>
Signed-off-by: default avatarDillon Varone <dillon.varone@amd.com>
Tested-by: default avatarDaniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent dbede77c
...@@ -1082,7 +1082,8 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context) ...@@ -1082,7 +1082,8 @@ static void disable_dangling_plane(struct dc *dc, struct dc_state *context)
break; break;
} }
} }
if (!should_disable && pipe_split_change) if (!should_disable && pipe_split_change &&
dc->current_state->stream_count != context->stream_count)
should_disable = true; should_disable = true;
if (should_disable && old_stream) { if (should_disable && old_stream) {
...@@ -1690,6 +1691,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c ...@@ -1690,6 +1691,7 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
struct pipe_ctx *pipe; struct pipe_ctx *pipe;
int i, k, l; int i, k, l;
struct dc_stream_state *dc_streams[MAX_STREAMS] = {0}; struct dc_stream_state *dc_streams[MAX_STREAMS] = {0};
struct dc_state *old_state;
#if defined(CONFIG_DRM_AMD_DC_DCN) #if defined(CONFIG_DRM_AMD_DC_DCN)
dc_z10_restore(dc); dc_z10_restore(dc);
...@@ -1808,10 +1810,11 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c ...@@ -1808,10 +1810,11 @@ static enum dc_status dc_commit_state_no_check(struct dc *dc, struct dc_state *c
for (i = 0; i < context->stream_count; i++) for (i = 0; i < context->stream_count; i++)
context->streams[i]->mode_changed = false; context->streams[i]->mode_changed = false;
dc_release_state(dc->current_state); old_state = dc->current_state;
dc->current_state = context; dc->current_state = context;
dc_release_state(old_state);
dc_retain_state(dc->current_state); dc_retain_state(dc->current_state);
return result; return result;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment