forked from Minki/linux
drm/amd/display: Fix hubp check in set_cursor_position
Found by smatch: drivers/gpu/drm/amd/amdgpu/../display/dc/core/dc_stream.c:298 dc_stream_set_cursor_position() error: we previously assumed 'hubp' could be null (see line 294) Signed-off-by: Harry Wentland <harry.wentland@amd.com> Reviewed-by: Tony Cheng <Tony.Cheng@amd.com> Acked-by: Harry Wentland <harry.wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b001965d4e
commit
b3fb2b4e21
@ -263,7 +263,6 @@ bool dc_stream_set_cursor_position(
|
||||
struct input_pixel_processor *ipp = pipe_ctx->plane_res.ipp;
|
||||
struct mem_input *mi = pipe_ctx->plane_res.mi;
|
||||
struct hubp *hubp = pipe_ctx->plane_res.hubp;
|
||||
struct transform *xfm = pipe_ctx->plane_res.xfm;
|
||||
struct dpp *dpp = pipe_ctx->plane_res.dpp;
|
||||
struct dc_cursor_position pos_cpy = *position;
|
||||
struct dc_cursor_mi_param param = {
|
||||
@ -294,11 +293,11 @@ bool dc_stream_set_cursor_position(
|
||||
if (mi != NULL && mi->funcs->set_cursor_position != NULL)
|
||||
mi->funcs->set_cursor_position(mi, &pos_cpy, ¶m);
|
||||
|
||||
if (hubp != NULL && hubp->funcs->set_cursor_position != NULL)
|
||||
hubp->funcs->set_cursor_position(hubp, &pos_cpy, ¶m);
|
||||
if (!hubp)
|
||||
continue;
|
||||
|
||||
if (xfm != NULL && xfm->funcs->set_cursor_position != NULL)
|
||||
xfm->funcs->set_cursor_position(xfm, &pos_cpy, ¶m, hubp->curs_attr.width);
|
||||
if (hubp->funcs->set_cursor_position != NULL)
|
||||
hubp->funcs->set_cursor_position(hubp, &pos_cpy, ¶m);
|
||||
|
||||
if (dpp != NULL && dpp->funcs->set_cursor_position != NULL)
|
||||
dpp->funcs->set_cursor_position(dpp, &pos_cpy, ¶m, hubp->curs_attr.width);
|
||||
|
@ -259,13 +259,6 @@ struct transform_funcs {
|
||||
struct transform *xfm_base,
|
||||
const struct dc_cursor_attributes *attr);
|
||||
|
||||
void (*set_cursor_position)(
|
||||
struct transform *xfm_base,
|
||||
const struct dc_cursor_position *pos,
|
||||
const struct dc_cursor_mi_param *param,
|
||||
uint32_t width
|
||||
);
|
||||
|
||||
};
|
||||
|
||||
const uint16_t *get_filter_2tap_16p(void);
|
||||
|
Loading…
Reference in New Issue
Block a user