From 7157a789df9f56b32ee4591bb6a07f4740d2c662 Mon Sep 17 00:00:00 2001 From: Mykola Lysenko Date: Wed, 3 Feb 2016 17:09:35 -0500 Subject: [PATCH 0765/1110] drm/amd/dal: only poll for ACT when needed Should not poll for ACT change state when nothing changed actually, because ACT will not change Signed-off-by: Mykola Lysenko Acked-by: Jordan Lazare --- drivers/gpu/drm/amd/dal/dc/dce110/dce110_hw_sequencer.c | 10 +++++++++- 1 file changed, 9 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 71fa7b1..2a92cfd 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 @@ -753,6 +753,8 @@ static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx, { struct core_stream *stream = context->res_ctx.controller_ctx[controller_idx].stream; + struct core_stream *old_stream = + dc->current_context.res_ctx.controller_ctx[controller_idx].stream; struct output_pixel_processor *opp = context->res_ctx.pool.opps[controller_idx]; bool timing_changed = context->res_ctx.controller_ctx[controller_idx] @@ -765,7 +767,13 @@ static enum dc_status apply_single_controller_ctx_to_hw(uint8_t controller_idx, */ stream->tg->funcs->set_blank(stream->tg, true); - core_link_disable_stream(stream->sink->link, stream); + /* + * only disable stream in case it was ever enabled + */ + if (old_stream) + core_link_disable_stream( + old_stream->sink->link, + old_stream); /*TODO: AUTO check if timing changed*/ if (false == stream->clock_source->funcs->program_pix_clk( -- 2.7.4