From 946650b1bc9918336e22eb81f7994fd4742ed1f1 Mon Sep 17 00:00:00 2001 From: Andrey Grodzovsky Date: Fri, 12 Feb 2016 11:42:41 -0500 Subject: [PATCH 0806/1110] drm/amd/dal: Reset unreference clock when switching streams. Signed-off-by: Andrey Grodzovsky Acked-by: Harry Wentland --- drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c index 810f6d5..4e73ad1 100644 --- a/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c +++ b/drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c @@ -776,9 +776,13 @@ static enum dc_status apply_single_controller_ctx_to_hw( /* * only disable stream in case it was ever enabled */ - if (old_pipe_ctx->stream) + if (old_pipe_ctx->stream) { core_link_disable_stream(old_pipe_ctx); + ASSERT(old_pipe_ctx->clock_source); + unreference_clock_source(&dc->current_context.res_ctx, old_pipe_ctx->clock_source); + } + /*TODO: AUTO check if timing changed*/ if (false == pipe_ctx->clock_source->funcs->program_pix_clk( pipe_ctx->clock_source, @@ -1499,6 +1503,8 @@ static void reset_single_pipe_hw_ctx( dc->hwss.enable_display_power_gating( pipe_ctx->stream->ctx, pipe_ctx->pipe_idx, dcb, PIPE_GATING_CONTROL_ENABLE); + + pipe_ctx->stream = NULL; } static void reset_hw_ctx( -- 2.7.4