Commit e9917ef8 authored by Aric Cyr's avatar Aric Cyr Committed by Alex Deucher

drm/amd/display: Only wait for flip pending on immediate flips

[Why]
We want to make sure all immediate flips are completed before locking
the pipes, but not pipes that are not flip immediate as they will be
locked by the OTG

[How]
Skip non flip immediate pipes when checking for flip pending.
Signed-off-by: default avatarAric Cyr <aric.cyr@amd.com>
Acked-by: default avatarBindu Ramamurthy <bindu.r@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 06d55ffa
...@@ -1165,27 +1165,28 @@ void dcn20_pipe_control_lock( ...@@ -1165,27 +1165,28 @@ void dcn20_pipe_control_lock(
temp_pipe = pipe->bottom_pipe; temp_pipe = pipe->bottom_pipe;
while (!flip_immediate && temp_pipe) { while (!flip_immediate && temp_pipe) {
if (temp_pipe->plane_state != NULL) if (temp_pipe->plane_state != NULL)
flip_immediate = temp_pipe->plane_state->flip_immediate; flip_immediate = temp_pipe->plane_state->flip_immediate;
temp_pipe = temp_pipe->bottom_pipe; temp_pipe = temp_pipe->bottom_pipe;
} }
if (flip_immediate && lock) { if (flip_immediate && lock) {
const int TIMEOUT_FOR_FLIP_PENDING = 100000; const int TIMEOUT_FOR_FLIP_PENDING = 100000;
int i; int i;
for (i = 0; i < TIMEOUT_FOR_FLIP_PENDING; ++i) { temp_pipe = pipe;
if (!pipe->plane_res.hubp->funcs->hubp_is_flip_pending(pipe->plane_res.hubp)) while (temp_pipe) {
break; if (temp_pipe->plane_state && temp_pipe->plane_state->flip_immediate) {
udelay(1); for (i = 0; i < TIMEOUT_FOR_FLIP_PENDING; ++i) {
} if (!temp_pipe->plane_res.hubp->funcs->hubp_is_flip_pending(temp_pipe->plane_res.hubp))
break;
if (pipe->bottom_pipe != NULL) { udelay(1);
for (i = 0; i < TIMEOUT_FOR_FLIP_PENDING; ++i) { }
if (!pipe->bottom_pipe->plane_res.hubp->funcs->hubp_is_flip_pending(pipe->bottom_pipe->plane_res.hubp))
break; /* no reason it should take this long for immediate flips */
udelay(1); ASSERT(i != TIMEOUT_FOR_FLIP_PENDING);
} }
temp_pipe = temp_pipe->bottom_pipe;
} }
} }
......
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