Skip to content

Commit

Permalink
drm/amd/display: Add NULL check for enabling dp ss
Browse files Browse the repository at this point in the history
[Why]

The pointer for integrated_info can be NULL which causes the system to
do a null pointer deference and hang on boot.

[How]

Add a check to ensure that integrated_info is not null before enabling
DP ss.

Signed-off-by: Nicholas Kazlauskas <nicholas.kazlauskas@amd.com>
Reviewed-by: Sun peng Li <Sunpeng.Li@amd.com>
Acked-by: Bhawanpreet Lakha <Bhawanpreet.Lakha@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
  • Loading branch information
Nicholas Kazlauskas authored and Alex Deucher committed Aug 6, 2018
1 parent ad830e7 commit fb7b11e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/gpu/drm/amd/display/dc/core/dc_link.c
Original file line number Diff line number Diff line change
@@ -1038,7 +1038,9 @@ static bool construct(
link->link_index = init_params->link_index;

link->link_id = bios->funcs->get_connector_id(bios, init_params->connector_index);
link->dp_ss_off = !!dc_ctx->dc_bios->integrated_info->dp_ss_control;;

if (dc_ctx->dc_bios->integrated_info)
link->dp_ss_off = !!dc_ctx->dc_bios->integrated_info->dp_ss_control;

if (link->link_id.type != OBJECT_TYPE_CONNECTOR) {
dm_error("%s: Invalid Connector ObjectID from Adapter Service for connector index:%d! type %d expected %d\n",

0 comments on commit fb7b11e

Please sign in to comment.