summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/amd/display/dc/dce110
diff options
context:
space:
mode:
authorMikita Lipski <mikita.lipski@amd.com>2018-08-02 09:45:09 -0400
committerAlex Deucher <alexander.deucher@amd.com>2018-08-13 17:29:11 -0500
commitad8960a6cb06c446d0a391ce095f6f28edf36aff (patch)
tree58ef33720bbbe145f1461464612a518154a76b65 /drivers/gpu/drm/amd/display/dc/dce110
parentfc69009e35b74e45ad71140e94355e999b8d24af (diff)
downloadlinux-ad8960a6cb06c446d0a391ce095f6f28edf36aff.tar.gz
drm/amd/display: Check if clock source in use before disabling
[why] We are disabling clock source while other pipes are still using it, because we don't verify the number of pipes that share it. [how] - Adding a function in resources to return the number of pipes sharing the clock source. - Checking that no one is sharing the clock source before disabling Signed-off-by: Mikita Lipski <mikita.lipski@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Acked-by: Leo Li <sunpeng.li@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com> Cc: stable@vger.kernel.org
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce110')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c4
1 files changed, 3 insertions, 1 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 1d98e3678b04..5450d4d38e8a 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
@@ -1908,7 +1908,9 @@ static void dce110_reset_hw_ctx_wrap(
pipe_ctx_old->plane_res.mi->funcs->free_mem_input(
pipe_ctx_old->plane_res.mi, dc->current_state->stream_count);
- if (old_clk)
+ if (old_clk && 0 == resource_get_clock_source_reference(&context->res_ctx,
+ dc->res_pool,
+ old_clk))
old_clk->funcs->cs_power_down(old_clk);
dc->hwss.disable_plane(dc, pipe_ctx_old);