TV out for instance */
if (!connector->polled)
continue;
-
- if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT)) {
- if (connector->polled & DRM_CONNECTOR_POLL_DISCONNECT_ONLY)
- repoll = (connector->status == connector_status_connected);
- else
- repoll = true;
- }
+ else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
+ DRM_CONNECTOR_POLL_DISCONNECT))
+ repoll = true;
old_status = connector->status;
/* if we are connected and don't want to poll for disconnect
return true;
}
+/*
+ * intel_hdmi_hpd- is the specified port connected?
+ * @dev_priv: i915 private structure
+ * @intel_hdmi: the HDMI port to test
+ *
+ * Returns true if @intel_hdmi is connected, false otherwise.
+ */
+static bool intel_hdmi_hpd(struct drm_i915_private *dev_priv,
+ struct intel_hdmi *intel_hdmi)
+{
+ u32 bit;
+
+ /* XXX: IBX has different SDEISR bits */
+ if (HAS_PCH_IBX(dev_priv->dev))
+ return true;
+
+ switch (intel_hdmi->sdvox_reg) {
+ case HDMIB:
+ case SDVOB:
+ bit = SDE_PORTB_HOTPLUG_CPT;
+ break;
+ case HDMIC:
+ case SDVOC:
+ bit = SDE_PORTC_HOTPLUG_CPT;
+ break;
+ case HDMID:
+ bit = SDE_PORTD_HOTPLUG_CPT;
+ break;
+ default:
+ return true;
+ }
+
+ return I915_READ(SDEISR) & bit;
+}
+
static enum drm_connector_status
intel_hdmi_detect(struct drm_connector *connector, bool force)
{
intel_hdmi->has_hdmi_sink = false;
intel_hdmi->has_audio = false;
+
+ if (HAS_PCH_SPLIT(connector->dev) &&
+ !intel_hdmi_hpd(dev_priv, intel_hdmi))
+ return status;
+
edid = drm_get_edid(connector,
intel_gmbus_get_adapter(dev_priv,
intel_hdmi->ddc_bus));
intel_encoder->type = INTEL_OUTPUT_HDMI;
- connector->polled = DRM_CONNECTOR_POLL_DISCONNECT | DRM_CONNECTOR_POLL_DISCONNECT_ONLY;
+ connector->polled = DRM_CONNECTOR_POLL_HPD;
connector->interlace_allowed = 1;
connector->doublescan_allowed = 0;
intel_encoder->crtc_mask = (1 << 0) | (1 << 1) | (1 << 2);
/* can cleanly poll for disconnections without flickering the screen */
/* DACs should rarely do this without a lot of testing */
#define DRM_CONNECTOR_POLL_DISCONNECT (1 << 2)
-/* Only poll for disconnections. */
-#define DRM_CONNECTOR_POLL_DISCONNECT_ONLY (1 << 3)
#define MAX_ELD_BYTES 128