]> git.itanic.dy.fi Git - linux-stable/commitdiff
drm/amd/display: skip audio setup when audio stream is enabled
authorzhikzhai <zhikai.zhai@amd.com>
Fri, 26 Aug 2022 11:44:50 +0000 (19:44 +0800)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 21 Sep 2022 21:23:44 +0000 (17:23 -0400)
[why]
We have minimal pipe split transition method to avoid pipe
allocation outage.However, this method will invoke audio setup
which cause audio output stuck once pipe reallocate.

[how]
skip audio setup for pipelines which audio stream has been enabled

Reviewed-by: Charlene Liu <Charlene.Liu@amd.com>
Acked-by: Wayne Lin <wayne.lin@amd.com>
Signed-off-by: zhikzhai <zhikai.zhai@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c

index 38a67051d470f24cd1407a0a828b035760b7d36c..aea49334021c90b2f9183713b024721808e9d606 100644 (file)
@@ -2164,7 +2164,8 @@ static void dce110_setup_audio_dto(
                        continue;
                if (pipe_ctx->stream->signal != SIGNAL_TYPE_HDMI_TYPE_A)
                        continue;
-               if (pipe_ctx->stream_res.audio != NULL) {
+               if (pipe_ctx->stream_res.audio != NULL &&
+                       pipe_ctx->stream_res.audio->enabled == false) {
                        struct audio_output audio_output;
 
                        build_audio_output(context, pipe_ctx, &audio_output);
@@ -2204,7 +2205,8 @@ static void dce110_setup_audio_dto(
                        if (!dc_is_dp_signal(pipe_ctx->stream->signal))
                                continue;
 
-                       if (pipe_ctx->stream_res.audio != NULL) {
+                       if (pipe_ctx->stream_res.audio != NULL &&
+                               pipe_ctx->stream_res.audio->enabled == false) {
                                struct audio_output audio_output;
 
                                build_audio_output(context, pipe_ctx, &audio_output);