Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c36346e3 authored by Damien Lespiau's avatar Damien Lespiau Committed by Daniel Vetter
Browse files

drm/i915: Implement ibx_digital_port_connected() for IBX



CPT+ PCHs have different bit definition to read the HPD live status. I
don't have an ILK with digital ports handy, which is why this patch is
separate from the CPT+ implementation. If the docs don't lie, it should
all be fine though.

Signed-off-by: default avatarDamien Lespiau <damien.lespiau@intel.com>
Reviewed-by: default avatarJani Nikula <jani.nikula@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 577c7a50
Loading
Loading
Loading
Loading
+28 −16
Original line number Original line Diff line number Diff line
@@ -997,10 +997,21 @@ bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
{
{
	u32 bit;
	u32 bit;


	/* XXX: IBX has different SDEISR bits */
	if (HAS_PCH_IBX(dev_priv->dev)) {
	if (HAS_PCH_IBX(dev_priv->dev))
		switch(port->port) {
		case PORT_B:
			bit = SDE_PORTB_HOTPLUG;
			break;
		case PORT_C:
			bit = SDE_PORTC_HOTPLUG;
			break;
		case PORT_D:
			bit = SDE_PORTD_HOTPLUG;
			break;
		default:
			return true;
			return true;

		}
	} else {
		switch(port->port) {
		switch(port->port) {
		case PORT_B:
		case PORT_B:
			bit = SDE_PORTB_HOTPLUG_CPT;
			bit = SDE_PORTB_HOTPLUG_CPT;
@@ -1014,6 +1025,7 @@ bool ibx_digital_port_connected(struct drm_i915_private *dev_priv,
		default:
		default:
			return true;
			return true;
		}
		}
	}


	return I915_READ(SDEISR) & bit;
	return I915_READ(SDEISR) & bit;
}
}