Commit dc75dd70 authored by Roman Li's avatar Roman Li Committed by Alex Deucher

drm/amd/display: fix boot-up on vega10

Fixing null-deref on Vega10 due to regression after
'fix cursor related Pstate hang' change.
Added null checks in setting cursor position.
Signed-off-by: default avatarRoman Li <Roman.Li@amd.com>
Reviewed-by: default avatarEric Yang <eric.yang2@amd.com>
Reviewed-by: default avatarHarry Wentland <Harry.Wentland@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 5f353208
...@@ -2928,7 +2928,9 @@ void dce110_set_cursor_position(struct pipe_ctx *pipe_ctx) ...@@ -2928,7 +2928,9 @@ void dce110_set_cursor_position(struct pipe_ctx *pipe_ctx)
if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state)
pos_cpy.enable = false; pos_cpy.enable = false;
if (ipp->funcs->ipp_cursor_set_position)
ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param); ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param);
if (mi->funcs->set_cursor_position)
mi->funcs->set_cursor_position(mi, &pos_cpy, &param); mi->funcs->set_cursor_position(mi, &pos_cpy, &param);
} }
...@@ -2936,12 +2938,15 @@ void dce110_set_cursor_attribute(struct pipe_ctx *pipe_ctx) ...@@ -2936,12 +2938,15 @@ void dce110_set_cursor_attribute(struct pipe_ctx *pipe_ctx)
{ {
struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes; struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes;
if (pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes)
pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes( pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes(
pipe_ctx->plane_res.ipp, attributes); pipe_ctx->plane_res.ipp, attributes);
if (pipe_ctx->plane_res.mi->funcs->set_cursor_attributes)
pipe_ctx->plane_res.mi->funcs->set_cursor_attributes( pipe_ctx->plane_res.mi->funcs->set_cursor_attributes(
pipe_ctx->plane_res.mi, attributes); pipe_ctx->plane_res.mi, attributes);
if (pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes)
pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes( pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes(
pipe_ctx->plane_res.xfm, attributes); pipe_ctx->plane_res.xfm, attributes);
} }
......
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