drm/amd/display: Use mdelay to avoid context switch

[why]
The rapid msleep operation causes the white line garbage when
DAL check flip pending status in SetVidPnSourceVisibility.
To execute this msleep will induce context switch, and longer
delay could cause worse garbage situation.

[how]
To replace msleep with mdelay.

Signed-off-by: Martin Tsai <martin.tsai@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <harry.wentland@amd.com>
Acked-by: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Martin Tsai
2019-12-26 16:19:47 +08:00
committed by Alex Deucher
parent bae9c49bf0
commit 38259bacd7

View File

@@ -1642,9 +1642,9 @@ void dcn20_program_front_end_for_ctx(
struct hubp *hubp = pipe->plane_res.hubp; struct hubp *hubp = pipe->plane_res.hubp;
int j = 0; int j = 0;
for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS for (j = 0; j < TIMEOUT_FOR_PIPE_ENABLE_MS*1000
&& hubp->funcs->hubp_is_flip_pending(hubp); j++) && hubp->funcs->hubp_is_flip_pending(hubp); j++)
msleep(1); mdelay(1);
} }
} }