Commit 7f3561be authored by Sonika Jindal's avatar Sonika Jindal Committed by Daniel Vetter

drm/i915/bxt: Add HPD support for DDIA

Also remove redundant comments.
Signed-off-by: default avatarSonika Jindal <sonika.jindal@intel.com>
Reviewed-by: default avatarSivakumar Thulasimani <sivakumar.thulasimani@intel.com>
Signed-off-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent 25f50337
...@@ -90,6 +90,7 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = { ...@@ -90,6 +90,7 @@ static const u32 hpd_status_i915[HPD_NUM_PINS] = {
/* BXT hpd list */ /* BXT hpd list */
static const u32 hpd_bxt[HPD_NUM_PINS] = { static const u32 hpd_bxt[HPD_NUM_PINS] = {
[HPD_PORT_A] = BXT_DE_PORT_HP_DDIA,
[HPD_PORT_B] = BXT_DE_PORT_HP_DDIB, [HPD_PORT_B] = BXT_DE_PORT_HP_DDIB,
[HPD_PORT_C] = BXT_DE_PORT_HP_DDIC [HPD_PORT_C] = BXT_DE_PORT_HP_DDIC
}; };
...@@ -3014,30 +3015,25 @@ static void bxt_hpd_irq_setup(struct drm_device *dev) ...@@ -3014,30 +3015,25 @@ static void bxt_hpd_irq_setup(struct drm_device *dev)
u32 hotplug_port = 0; u32 hotplug_port = 0;
u32 hotplug_ctrl; u32 hotplug_ctrl;
/* Now, enable HPD */
for_each_intel_encoder(dev, intel_encoder) { for_each_intel_encoder(dev, intel_encoder) {
if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state if (dev_priv->hotplug.stats[intel_encoder->hpd_pin].state
== HPD_ENABLED) == HPD_ENABLED)
hotplug_port |= hpd_bxt[intel_encoder->hpd_pin]; hotplug_port |= hpd_bxt[intel_encoder->hpd_pin];
} }
/* Mask all HPD control bits */
hotplug_ctrl = I915_READ(BXT_HOTPLUG_CTL) & ~BXT_HOTPLUG_CTL_MASK; hotplug_ctrl = I915_READ(BXT_HOTPLUG_CTL) & ~BXT_HOTPLUG_CTL_MASK;
/* Enable requested port in hotplug control */ if (hotplug_port & BXT_DE_PORT_HP_DDIA)
/* TODO: implement (short) HPD support on port A */ hotplug_ctrl |= BXT_DDIA_HPD_ENABLE;
WARN_ON_ONCE(hotplug_port & BXT_DE_PORT_HP_DDIA);
if (hotplug_port & BXT_DE_PORT_HP_DDIB) if (hotplug_port & BXT_DE_PORT_HP_DDIB)
hotplug_ctrl |= BXT_DDIB_HPD_ENABLE; hotplug_ctrl |= BXT_DDIB_HPD_ENABLE;
if (hotplug_port & BXT_DE_PORT_HP_DDIC) if (hotplug_port & BXT_DE_PORT_HP_DDIC)
hotplug_ctrl |= BXT_DDIC_HPD_ENABLE; hotplug_ctrl |= BXT_DDIC_HPD_ENABLE;
I915_WRITE(BXT_HOTPLUG_CTL, hotplug_ctrl); I915_WRITE(BXT_HOTPLUG_CTL, hotplug_ctrl);
/* Unmask DDI hotplug in IMR */
hotplug_ctrl = I915_READ(GEN8_DE_PORT_IMR) & ~hotplug_port; hotplug_ctrl = I915_READ(GEN8_DE_PORT_IMR) & ~hotplug_port;
I915_WRITE(GEN8_DE_PORT_IMR, hotplug_ctrl); I915_WRITE(GEN8_DE_PORT_IMR, hotplug_ctrl);
/* Enable DDI hotplug in IER */
hotplug_ctrl = I915_READ(GEN8_DE_PORT_IER) | hotplug_port; hotplug_ctrl = I915_READ(GEN8_DE_PORT_IER) | hotplug_port;
I915_WRITE(GEN8_DE_PORT_IER, hotplug_ctrl); I915_WRITE(GEN8_DE_PORT_IER, hotplug_ctrl);
POSTING_READ(GEN8_DE_PORT_IER); POSTING_READ(GEN8_DE_PORT_IER);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment