diff options
author | Bernard Zhao <bernard@vivo.com> | 2020-10-12 14:46:16 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2020-10-14 22:13:53 +0300 |
commit | 4fbb3ae219d2da0e21352c4eb1af6269b832ac10 (patch) | |
tree | 98fd09a84323d04e733f4cb67646649b22f719b5 /drivers/gpu/drm/amd/display/dc/core/dc.c | |
parent | 206b737240c36d3f1ddc7a1a68f13e59ad071022 (diff) | |
download | linux-4fbb3ae219d2da0e21352c4eb1af6269b832ac10.tar.xz |
drm/amd/display: remove no need return value
Functions (disable_all_writeback_pipes_for_stream &
dc_enable_stereo & dc_post_update_surfaces_to_stream)
always return true, there is no need to keep the return value.
This change is to make the code a bit more readable.
Signed-off-by: Bernard Zhao <bernard@vivo.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/display/dc/core/dc.c')
-rw-r--r-- | drivers/gpu/drm/amd/display/dc/core/dc.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/core/dc.c b/drivers/gpu/drm/amd/display/dc/core/dc.c index 3f7d04b8956a..72819cf19b5b 100644 --- a/drivers/gpu/drm/amd/display/dc/core/dc.c +++ b/drivers/gpu/drm/amd/display/dc/core/dc.c @@ -763,7 +763,7 @@ fail: return false; } -static bool disable_all_writeback_pipes_for_stream( +static void disable_all_writeback_pipes_for_stream( const struct dc *dc, struct dc_stream_state *stream, struct dc_state *context) @@ -772,8 +772,6 @@ static bool disable_all_writeback_pipes_for_stream( for (i = 0; i < stream->num_wb_info; i++) stream->writeback_info[i].wb_enabled = false; - - return true; } void apply_ctx_interdependent_lock(struct dc *dc, struct dc_state *context, struct dc_stream_state *stream, bool lock) @@ -1269,13 +1267,12 @@ bool dc_validate_seamless_boot_timing(const struct dc *dc, return true; } -bool dc_enable_stereo( +void dc_enable_stereo( struct dc *dc, struct dc_state *context, struct dc_stream_state *streams[], uint8_t stream_count) { - bool ret = true; int i, j; struct pipe_ctx *pipe; @@ -1290,8 +1287,6 @@ bool dc_enable_stereo( dc->hwss.setup_stereo(pipe, dc); } } - - return ret; } void dc_trigger_sync(struct dc *dc, struct dc_state *context) @@ -1530,18 +1525,18 @@ static bool is_flip_pending_in_pipes(struct dc *dc, struct dc_state *context) return false; } -bool dc_post_update_surfaces_to_stream(struct dc *dc) +void dc_post_update_surfaces_to_stream(struct dc *dc) { int i; struct dc_state *context = dc->current_state; if ((!dc->optimized_required) || dc->optimize_seamless_boot_streams > 0) - return true; + return; post_surface_trace(dc); if (is_flip_pending_in_pipes(dc, context)) - return true; + return; for (i = 0; i < dc->res_pool->pipe_count; i++) if (context->res_ctx.pipe_ctx[i].stream == NULL || @@ -1554,8 +1549,6 @@ bool dc_post_update_surfaces_to_stream(struct dc *dc) dc->optimized_required = false; dc->wm_optimized_required = false; - - return true; } static void init_state(struct dc *dc, struct dc_state *context) |