Commit aa985070 authored by Eric Yang's avatar Eric Yang Committed by Alex Deucher
Browse files

drm/amd/display: fix locking in apply_ctx_for_surface

parent 7f10f3c2
Loading
Loading
Loading
Loading
+7 −1
Original line number Original line Diff line number Diff line
@@ -1696,8 +1696,14 @@ static void dcn10_apply_ctx_for_surface(
		 */
		 */


		if (pipe_ctx->surface && !old_pipe_ctx->surface) {
		if (pipe_ctx->surface && !old_pipe_ctx->surface) {
			if (pipe_ctx->mpcc->opp_id != 0xf && pipe_ctx->tg->inst == be_idx)
			if (pipe_ctx->mpcc->opp_id != 0xf && pipe_ctx->tg->inst == be_idx) {
				dcn10_power_down_fe(dc, pipe_ctx->pipe_idx);
				dcn10_power_down_fe(dc, pipe_ctx->pipe_idx);
				/*
				 * power down fe will unlock when calling reset, need
				 * to lock it back here. Messy, need rework.
				 */
				pipe_ctx->tg->funcs->lock(pipe_ctx->tg);
			}
		}
		}