Skip to content

Commit e6142dd

Browse files
Aurabindo Pillaialexdeucher
authored andcommitted
drm/amd/display: Prevent dpcd reads with passive dongles
[why] During hotplug, a DP port may be connected to the sink through passive adapter which does not support DPCD reads. Issuing reads without checking for this condition will result in errors [how] Ensure the link is in aux_mode before initiating operation that result in a DPCD read. Signed-off-by: Aurabindo Pillai <[email protected]> Reviewed-by: Harry Wentland <[email protected]> Acked-by: Aurabindo Pillai <[email protected]> Signed-off-by: Alex Deucher <[email protected]>
1 parent 80797dd commit e6142dd

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm.c

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2008,17 +2008,22 @@ void amdgpu_dm_update_connector_after_detect(
20082008
dc_sink_retain(aconnector->dc_sink);
20092009
if (sink->dc_edid.length == 0) {
20102010
aconnector->edid = NULL;
2011-
drm_dp_cec_unset_edid(&aconnector->dm_dp_aux.aux);
2011+
if (aconnector->dc_link->aux_mode) {
2012+
drm_dp_cec_unset_edid(
2013+
&aconnector->dm_dp_aux.aux);
2014+
}
20122015
} else {
20132016
aconnector->edid =
2014-
(struct edid *) sink->dc_edid.raw_edid;
2015-
2017+
(struct edid *)sink->dc_edid.raw_edid;
20162018

20172019
drm_connector_update_edid_property(connector,
2018-
aconnector->edid);
2019-
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
2020-
aconnector->edid);
2020+
aconnector->edid);
2021+
2022+
if (aconnector->dc_link->aux_mode)
2023+
drm_dp_cec_set_edid(&aconnector->dm_dp_aux.aux,
2024+
aconnector->edid);
20212025
}
2026+
20222027
amdgpu_dm_update_freesync_caps(connector, aconnector->edid);
20232028
update_connector_ext_caps(aconnector);
20242029
} else {

0 commit comments

Comments
 (0)