mirror of
https://github.com/edk2-porting/linux-next.git
synced 2024-12-25 05:34:00 +08:00
drm/dp/mst: Check peer device type before attempting EDID read
Only certain types of pdts have the DDC bus registered, so check for that before we attempt the EDID read. Othwewise we risk playing around with an i2c adapter that doesn't actually exist. Cc: stable@vger.kernel.org Cc: Carlos Santa <carlos.santa@intel.com> Cc: Kirill A. Shutemov <kirill@shutemov.name> Tested-by: Carlos Santa <carlos.santa@intel.com> Tested-by: Kirill A. Shutemov <kirill@shutemov.name> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=97666 Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1477472755-15288-5-git-send-email-ville.syrjala@linux.intel.com
This commit is contained in:
parent
36e3fa6a38
commit
4da5caa6a6
@ -1160,7 +1160,9 @@ static void drm_dp_add_port(struct drm_dp_mst_branch *mstb,
|
|||||||
drm_dp_put_port(port);
|
drm_dp_put_port(port);
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
if (port->port_num >= DP_MST_LOGICAL_PORT_0) {
|
if ((port->pdt == DP_PEER_DEVICE_DP_LEGACY_CONV ||
|
||||||
|
port->pdt == DP_PEER_DEVICE_SST_SINK) &&
|
||||||
|
port->port_num >= DP_MST_LOGICAL_PORT_0) {
|
||||||
port->cached_edid = drm_get_edid(port->connector, &port->aux.ddc);
|
port->cached_edid = drm_get_edid(port->connector, &port->aux.ddc);
|
||||||
drm_mode_connector_set_tile_property(port->connector);
|
drm_mode_connector_set_tile_property(port->connector);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user