diff options
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3084-drm-amd-display-Set-enabled-to-false-at-start-of-aud.patch')
-rw-r--r-- | meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3084-drm-amd-display-Set-enabled-to-false-at-start-of-aud.patch | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3084-drm-amd-display-Set-enabled-to-false-at-start-of-aud.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3084-drm-amd-display-Set-enabled-to-false-at-start-of-aud.patch new file mode 100644 index 00000000..9d144ac6 --- /dev/null +++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3084-drm-amd-display-Set-enabled-to-false-at-start-of-aud.patch @@ -0,0 +1,58 @@ +From e520e3ddd6783feb67e51d81d74f6546906af887 Mon Sep 17 00:00:00 2001 +From: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +Date: Wed, 3 Jul 2019 10:02:39 -0400 +Subject: [PATCH 3084/4256] drm/amd/display: Set enabled to false at start of + audio disable + +[Why] +In an effort to stop redundant calls to dce110_disable_audio_stream +the audio->enabled flag was added to the audio resource struct. While +this state probably shouldn't have been tracked on the audio struct +itself it still works fine for some sequences. + +However, it does not work for cases where we're freeing the audio +resource (such as hotplugs) or when dynamic audio is enabled. + +In these cases the pipe_ctx->stream_res.audio = NULL before we can +set audio->enabled = false. The next time we acquire the audio resource +such as on hotplug the audio will not be enabled for the stream since +DC thinks it's still enabled. + +Audio state tracking should cover this sequence. + +[How] +Set audio->enabled = false at the start as long as we have +pipe_ctx->stream_res.audio. + +Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com> +Reviewed-by: Zhan Liu <Zhan.Liu@amd.com> +Acked-by: Leo Li <sunpeng.li@amd.com> +--- + drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +index b8ef57a24228..46dfab749679 100644 +--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c ++++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c +@@ -996,6 +996,8 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option) + pipe_ctx->stream_res.stream_enc->funcs->audio_mute_control( + pipe_ctx->stream_res.stream_enc, true); + if (pipe_ctx->stream_res.audio) { ++ pipe_ctx->stream_res.audio->enabled = false; ++ + if (dc->res_pool->pp_smu) + pp_smu = dc->res_pool->pp_smu; + +@@ -1026,8 +1028,6 @@ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option) + /* dal_audio_disable_azalia_audio_jack_presence(stream->audio, + * stream->stream_engine_id); + */ +- if (pipe_ctx->stream_res.audio) +- pipe_ctx->stream_res.audio->enabled = false; + } + } + +-- +2.17.1 + |