aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorRoman Li <Roman.Li@amd.com>2018-01-23 11:12:27 -0500
committerAlex Deucher <alexander.deucher@amd.com>2018-03-07 16:27:54 -0500
commit8378fc7e48f2f2b167b5eff9de2d4a76cc1d0ca9 (patch)
tree6bd2a414fcf51590329c9d01fe74582816f9ccef /drivers
parent39b485e4dddb9c801616cb6632ea2d4f646780a2 (diff)
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: Roman Li <Roman.Li@amd.com> Reviewed-by: Eric Yang <eric.yang2@amd.com> Reviewed-by: Harry Wentland <Harry.Wentland@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
index e7e3028fa5d5..dd1f206332ef 100644
--- a/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
+++ b/drivers/gpu/drm/amd/display/dc/dce110/dce110_hw_sequencer.c
@@ -2950,22 +2950,27 @@ void dce110_set_cursor_position(struct pipe_ctx *pipe_ctx)
2950 if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state) 2950 if (pipe_ctx->top_pipe && pipe_ctx->plane_state != pipe_ctx->top_pipe->plane_state)
2951 pos_cpy.enable = false; 2951 pos_cpy.enable = false;
2952 2952
2953 ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param); 2953 if (ipp->funcs->ipp_cursor_set_position)
2954 mi->funcs->set_cursor_position(mi, &pos_cpy, &param); 2954 ipp->funcs->ipp_cursor_set_position(ipp, &pos_cpy, &param);
2955 if (mi->funcs->set_cursor_position)
2956 mi->funcs->set_cursor_position(mi, &pos_cpy, &param);
2955} 2957}
2956 2958
2957void dce110_set_cursor_attribute(struct pipe_ctx *pipe_ctx) 2959void dce110_set_cursor_attribute(struct pipe_ctx *pipe_ctx)
2958{ 2960{
2959 struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes; 2961 struct dc_cursor_attributes *attributes = &pipe_ctx->stream->cursor_attributes;
2960 2962
2961 pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes( 2963 if (pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes)
2964 pipe_ctx->plane_res.ipp->funcs->ipp_cursor_set_attributes(
2962 pipe_ctx->plane_res.ipp, attributes); 2965 pipe_ctx->plane_res.ipp, attributes);
2963 2966
2964 pipe_ctx->plane_res.mi->funcs->set_cursor_attributes( 2967 if (pipe_ctx->plane_res.mi->funcs->set_cursor_attributes)
2965 pipe_ctx->plane_res.mi, attributes); 2968 pipe_ctx->plane_res.mi->funcs->set_cursor_attributes(
2969 pipe_ctx->plane_res.mi, attributes);
2966 2970
2967 pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes( 2971 if (pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes)
2968 pipe_ctx->plane_res.xfm, attributes); 2972 pipe_ctx->plane_res.xfm->funcs->set_cursor_attributes(
2973 pipe_ctx->plane_res.xfm, attributes);
2969} 2974}
2970 2975
2971static void ready_shared_resources(struct dc *dc, struct dc_state *context) {} 2976static void ready_shared_resources(struct dc *dc, struct dc_state *context) {}