]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/amd/display: fix missing az disable in reset backend
authorEric Yang <Eric.Yang2@amd.com>
Thu, 15 Feb 2018 20:55:31 +0000 (15:55 -0500)
committerAlex Deucher <alexander.deucher@amd.com>
Mon, 5 Mar 2018 20:33:34 +0000 (15:33 -0500)
Optimization in reset backend skips disable stream if it is
already done in dc_stream_set_dpms. However that path does
not disable az in order to prevent audio from toggling
between internal and external displays. This still need to
be done.

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 0384aefd79b63a5401f18a5e7107a8b06926c8df..4adb2d311d4eedc72e73fb91bae1f188aed55093 100644 (file)
@@ -536,6 +536,22 @@ static void reset_back_end_for_pipe(
                /* DPMS may already disable */
                if (!pipe_ctx->stream->dpms_off)
                        core_link_disable_stream(pipe_ctx, FREE_ACQUIRED_RESOURCE);
+               else if (pipe_ctx->stream_res.audio) {
+                       /*
+                        * if stream is already disabled outside of commit streams path,
+                        * audio disable was skipped. Need to do it here
+                        */
+                       pipe_ctx->stream_res.audio->funcs->az_disable(pipe_ctx->stream_res.audio);
+
+                       if (dc->caps.dynamic_audio == true) {
+                               /*we have to dynamic arbitrate the audio endpoints*/
+                               pipe_ctx->stream_res.audio = NULL;
+                               /*we free the resource, need reset is_audio_acquired*/
+                               update_audio_usage(&dc->current_state->res_ctx, dc->res_pool, pipe_ctx->stream_res.audio, false);
+                       }
+
+               }
+
        }
 
        /* by upper caller loop, parent pipe: pipe0, will be reset last.