Commit 1d0610bc authored by Alvin Lee's avatar Alvin Lee Committed by Alex Deucher

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: default avatarAlvin Lee <alvin.lee2@amd.com>
Reviewed-by: default avatarJun Lei <Jun.Lei@amd.com>
Acked-by: default avatarLeo Li <sunpeng.li@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 75c35000
...@@ -331,6 +331,7 @@ void dcn20_clk_mgr_construct( ...@@ -331,6 +331,7 @@ void dcn20_clk_mgr_construct(
struct dccg *dccg) struct dccg *dccg)
{ {
clk_mgr->base.ctx = ctx; clk_mgr->base.ctx = ctx;
clk_mgr->pp_smu = pp_smu;
clk_mgr->base.funcs = &dcn2_funcs; clk_mgr->base.funcs = &dcn2_funcs;
clk_mgr->regs = &clk_mgr_regs; clk_mgr->regs = &clk_mgr_regs;
clk_mgr->clk_mgr_shift = &clk_mgr_shift; clk_mgr->clk_mgr_shift = &clk_mgr_shift;
......
...@@ -965,11 +965,17 @@ void hwss_edp_backlight_control( ...@@ -965,11 +965,17 @@ void hwss_edp_backlight_control(
void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx) void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
{ {
/* notify audio driver for audio modes of monitor */ /* 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 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; 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) if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == true)
return; return;
...@@ -999,9 +1005,15 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx) ...@@ -999,9 +1005,15 @@ void dce110_enable_audio_stream(struct pipe_ctx *pipe_ctx)
void dce110_disable_audio_stream(struct pipe_ctx *pipe_ctx, int option) 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 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) if (pipe_ctx->stream_res.audio && pipe_ctx->stream_res.audio->enabled == false)
return; return;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment