Commit 34996173 authored by Harry Wentland's avatar Harry Wentland Committed by Alex Deucher

drm/amd/display: Remove redundant checks in set_default_colors

pipe_ctx->stream and pipe_ctx->plane_state are never NULL

Found by smatch:
drivers/gpu/drm/amd/amdgpu/../display/dc/dce110/dce110_hw_sequencer.c:2111
set_default_colors() error: we previously assumed 'pipe_ctx->stream'
could be null (see line 2101)
Signed-off-by: default avatarHarry Wentland <harry.wentland@amd.com>
Reviewed-by: default avatarTony Cheng <Tony.Cheng@amd.com>
Acked-by: default avatarHarry Wentland <harry.wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent ede56984
...@@ -2095,16 +2095,8 @@ static void set_default_colors(struct pipe_ctx *pipe_ctx) ...@@ -2095,16 +2095,8 @@ static void set_default_colors(struct pipe_ctx *pipe_ctx)
struct default_adjustment default_adjust = { 0 }; struct default_adjustment default_adjust = { 0 };
default_adjust.force_hw_default = false; default_adjust.force_hw_default = false;
if (pipe_ctx->plane_state == NULL) default_adjust.in_color_space = pipe_ctx->plane_state->color_space;
default_adjust.in_color_space = COLOR_SPACE_SRGB; default_adjust.out_color_space = pipe_ctx->stream->output_color_space;
else
default_adjust.in_color_space =
pipe_ctx->plane_state->color_space;
if (pipe_ctx->stream == NULL)
default_adjust.out_color_space = COLOR_SPACE_SRGB;
else
default_adjust.out_color_space =
pipe_ctx->stream->output_color_space;
default_adjust.csc_adjust_type = GRAPHICS_CSC_ADJUST_TYPE_SW; default_adjust.csc_adjust_type = GRAPHICS_CSC_ADJUST_TYPE_SW;
default_adjust.surface_pixel_format = pipe_ctx->plane_res.scl_data.format; default_adjust.surface_pixel_format = pipe_ctx->plane_res.scl_data.format;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment