@@ -49,6 +49,7 @@ void radeon_connector_hotplug(struct drm_connector *connector)
struct drm_device *dev = connector->dev;
struct radeon_device *rdev = dev->dev_private;
struct radeon_connector *radeon_connector = to_radeon_connector(connector);
+ struct radeon_connector_atom_dig *radeon_dig_connector = radeon_connector->con_priv;
/* bail if the connector does not have hpd pin, e.g.,
* VGA, TV, etc.
@@ -62,15 +63,32 @@ void radeon_connector_hotplug(struct drm_connector *connector)
if (connector->dpms != DRM_MODE_DPMS_ON)
return;
+ /* don't do anything is sink is not display port
+ * (passive dp->(dvi|hdmi|vga) adaptor
+ */
+ if (radeon_dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT) {
+ return;
+ }
+
/* just deal with DP (not eDP) here. */
if (connector->connector_type == DRM_MODE_CONNECTOR_DisplayPort) {
int saved_dpms = connector->dpms;
/* Only turn off the display it it's physically disconnected */
- if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd))
+ if (!radeon_hpd_sense(rdev, radeon_connector->hpd.hpd)) {
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_OFF);
- else if (radeon_dp_needs_link_train(radeon_connector))
+ } else if (radeon_dp_needs_link_train(radeon_connector)) {
+
+ /* first get sink type as it's reset after unplug */
+ radeon_dig_connector->dp_sink_type = radeon_dp_getsinktype(radeon_connector);
+ /* don't do anything is sink is not display port
+ * (passive dp->(dvi|hdmi|vga) adaptor
+ */
+ if (radeon_dig_connector->dp_sink_type != CONNECTOR_OBJECT_ID_DISPLAYPORT) {
+ return;
+ }
drm_helper_connector_dpms(connector, DRM_MODE_DPMS_ON);
+ }
connector->dpms = saved_dpms;
}
}