]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: fix locking in apply_ctx_for_surface
authorEric Yang <Eric.Yang2@amd.com>
Thu, 20 Jul 2017 20:17:17 +0000 (16:17 -0400)
committerAlex Deucher <alexander.deucher@amd.com>
Tue, 26 Sep 2017 22:15:26 +0000 (18:15 -0400)
Signed-off-by: Eric Yang <Eric.Yang2@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Harry Wentland <Harry.Wentland@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dcn10/dcn10_hw_sequencer.c

index d607ca94bd139e07dd2ab6208da89c0b05670140..6db78d9f8e3b1f6ed029eb8b3c98f6066c658abe 100644 (file)
@@ -1696,8 +1696,14 @@ static void dcn10_apply_ctx_for_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);
+                               /*
+                                * 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);
+                       }
                }