Skip to content

Commit

Permalink
drm/amdgpu: only set DP subconnector type on DP and eDP connectors
Browse files Browse the repository at this point in the history
Fixes a crash in drm_object_property_set_value() because the property
is not set for internal DP ports that connect to a bridge chips
(e.g., DP to VGA or DP to LVDS).

Bug: https://bugzilla.kernel.org/show_bug.cgi?id=210739
Fixes: 65bf2cf ("drm/amdgpu: utilize subconnector property for DP through atombios")
Tested-By: Kris Karas <[email protected]>
Cc: Oleg Vasilev <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
Cc: [email protected] # 5.10.x
  • Loading branch information
alexdeucher committed Dec 23, 2020
1 parent e75a9db commit 05211e7
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions drivers/gpu/drm/amd/amdgpu/amdgpu_connectors.c
Original file line number Diff line number Diff line change
Expand Up @@ -1414,10 +1414,12 @@ amdgpu_connector_dp_detect(struct drm_connector *connector, bool force)
pm_runtime_put_autosuspend(connector->dev->dev);
}

drm_dp_set_subconnector_property(&amdgpu_connector->base,
ret,
amdgpu_dig_connector->dpcd,
amdgpu_dig_connector->downstream_ports);
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort ||
connector->connector_type == DRM_MODE_CONNECTOR_eDP)
drm_dp_set_subconnector_property(&amdgpu_connector->base,
ret,
amdgpu_dig_connector->dpcd,
amdgpu_dig_connector->downstream_ports);
return ret;
}

Expand Down

0 comments on commit 05211e7

Please sign in to comment.