Commit 38259bac authored by Martin Tsai's avatar Martin Tsai Committed by Alex Deucher
Browse files

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: default avatarMartin Tsai <martin.tsai@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Acked-by: default avatarRodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bae9c49b
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -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);
		}
		}
	}
	}