aboutsummaryrefslogtreecommitdiffstats
path: root/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch')
-rw-r--r--meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch77
1 files changed, 77 insertions, 0 deletions
diff --git a/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch
new file mode 100644
index 00000000..f2a3258d
--- /dev/null
+++ b/meta-amd-bsp/recipes-kernel/linux/linux-yocto-4.19.8/3047-drm-amd-display-Disable-Audio-on-reinitialize-hardwa.patch
@@ -0,0 +1,77 @@
+From 61873a1b8b322fc2a6e26da460a518ccd0d7ea36 Mon Sep 17 00:00:00 2001
+From: Alvin Lee <alvin.lee2@amd.com>
+Date: Thu, 20 Jun 2019 13:03:25 -0400
+Subject: [PATCH 3047/4256] drm/amd/display: Disable Audio on reinitialize
+ hardware
+
+[Why]
+When we recover from hang, we do not want to skip the audio enable call.
+
+[How]
+Disable audio in dc_reinitialize_hardware
+
+Signed-off-by: Alvin Lee <alvin.lee2@amd.com>
+Reviewed-by: Jun Lei <Jun.Lei@amd.com>
+Acked-by: Leo Li <sunpeng.li@amd.com>
+---
+ .../display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c | 1 +
+ .../display/dc/dce110/dce110_hw_sequencer.c | 20 +++++++++++++++----
+ 2 files changed, 17 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
+index 614a941eb9f2..e9a7a7af11df 100644
+--- a/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
++++ b/drivers/gpu/drm/amd/display/dc/clk_mgr/dcn20/dcn20_clk_mgr.c
+@@ -331,6 +331,7 @@ void dcn20_clk_mgr_construct(
+ struct dccg *dccg)
+ {
+ clk_mgr->base.ctx = ctx;
++ clk_mgr->pp_smu = pp_smu;
+ clk_mgr->base.funcs = &dcn2_funcs;
+ clk_mgr->regs = &clk_mgr_regs;
+ clk_mgr->clk_mgr_shift = &clk_mgr_shift;
+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 6fa1f6b5375b..fedbc6d0c40d 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
+@@ -962,11 +962,17 @@ void hwss_edp_backlight_control(
+ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
+ {
+ /* notify audio driver for audio modes of monitor */
+- struct dc *core_dc = pipe_ctx->stream->ctx->dc;
++ struct dc *core_dc;
+ struct pp_smu_funcs *pp_smu = NULL;
+- struct clk_mgr *clk_mgr = core_dc->clk_mgr;
++ struct clk_mgr *clk_mgr;
+ unsigned int i, num_audio = 1;
+
++ if (!pipe_ctx->stream)
++ return;
++
++ core_dc = pipe_ctx->stream->ctx->dc;
++ clk_mgr = core_dc->clk_mgr;
++
+ if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == true)
+ return;
+
+@@ -996,9 +1002,15 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
+
+ void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option)
+ {
+- struct dc *dc = pipe_ctx->stream->ctx->dc;
++ struct dc *dc;
+ struct pp_smu_funcs *pp_smu = NULL;
+- struct clk_mgr *clk_mgr = dc->clk_mgr;
++ struct clk_mgr *clk_mgr;
++
++ if (!pipe_ctx || !pipe_ctx->stream)
++ return;
++
++ dc = pipe_ctx->stream->ctx->dc;
++ clk_mgr = dc->clk_mgr;
+
+ if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == false)
+ return;
+--
+2.17.1
+