diff options
author | Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com> | 2018-09-18 15:00:49 -0400 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2018-11-05 14:20:40 -0500 |
commit | 9566b67586fb1d96c36207fd975087d68296755c (patch) | |
tree | affd7cb835bd7e002d6ba1bcb82a5fe7f284a9af /drivers/gpu/drm/amd/display/dc/dce100 | |
parent | 24f7dd7ea98dc54fa45a0dd10c7a472e00ca01d4 (diff) | |
download | linux-9566b67586fb1d96c36207fd975087d68296755c.tar.bz2 |
drm/amd/display: remove safe_to_lower flag from dc, use 2 functions instead
This is done to keep things more readable, avoids a true/false flag
in dc interface layer.
Signed-off-by: Dmytro Laktyushkin <Dmytro.Laktyushkin@amd.com>
Reviewed-by: Tony Cheng <Tony.Cheng@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/dce100')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c | 15 | ||||
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h | 5 |
2 files changed, 7 insertions, 13 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c index 2725eac4baab..5055026e553f 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.c @@ -105,22 +105,16 @@ bool dce100_enable_display_power_gating( return false; } -void dce100_set_bandwidth( +void dce100_prepare_bandwidth( struct dc *dc, - struct dc_state *context, - bool decrease_allowed) + struct dc_state *context) { - int dispclk_khz = context->bw.dce.dispclk_khz; - - context->bw.dce.dispclk_khz = context->bw.dce.dispclk_khz * 115 / 100; - dce110_set_safe_displaymarks(&context->res_ctx, dc->res_pool); dc->res_pool->dccg->funcs->update_clocks( dc->res_pool->dccg, context, - decrease_allowed); - context->bw.dce.dispclk_khz = dispclk_khz; + false); } /**************************************************************************/ @@ -130,6 +124,7 @@ void dce100_hw_sequencer_construct(struct dc *dc) dce110_hw_sequencer_construct(dc); dc->hwss.enable_display_power_gating = dce100_enable_display_power_gating; - dc->hwss.set_bandwidth = dce100_set_bandwidth; + dc->hwss.prepare_bandwidth = dce100_prepare_bandwidth; + dc->hwss.optimize_bandwidth = dce100_prepare_bandwidth; } diff --git a/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h b/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h index c6ec0ed6ec3d..acd418515346 100644 --- a/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h +++ b/drivers/gpu/drm/amd/display/dc/dce100/dce100_hw_sequencer.h @@ -33,10 +33,9 @@ struct dc_state; void dce100_hw_sequencer_construct(struct dc *dc); -void dce100_set_bandwidth( +void dce100_prepare_bandwidth( struct dc *dc, - struct dc_state *context, - bool decrease_allowed); + struct dc_state *context); bool dce100_enable_display_power_gating(struct dc *dc, uint8_t controller_id, struct dc_bios *dcb, |