|
@@ -2526,25 +2526,6 @@ static int i915_irq_postinstall(struct drm_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void i915_hpd_irq_setup(struct drm_device *dev)
|
|
|
-{
|
|
|
- if (I915_HAS_HOTPLUG(dev)) {
|
|
|
- drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
|
|
- struct drm_mode_config *mode_config = &dev->mode_config;
|
|
|
- struct intel_encoder *encoder;
|
|
|
- u32 hotplug_en = I915_READ(PORT_HOTPLUG_EN);
|
|
|
-
|
|
|
- hotplug_en &= ~HOTPLUG_INT_EN_MASK;
|
|
|
- list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
|
|
|
- hotplug_en |= hpd_mask_i915[encoder->hpd_pin];
|
|
|
- hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
|
|
|
-
|
|
|
- /* Ignore TV since it's buggy */
|
|
|
-
|
|
|
- I915_WRITE(PORT_HOTPLUG_EN, hotplug_en);
|
|
|
- }
|
|
|
-}
|
|
|
-
|
|
|
/*
|
|
|
* Returns true when a page flip has completed.
|
|
|
*/
|
|
@@ -2774,29 +2755,31 @@ static int i965_irq_postinstall(struct drm_device *dev)
|
|
|
return 0;
|
|
|
}
|
|
|
|
|
|
-static void i965_hpd_irq_setup(struct drm_device *dev)
|
|
|
+static void i915_hpd_irq_setup(struct drm_device *dev)
|
|
|
{
|
|
|
drm_i915_private_t *dev_priv = (drm_i915_private_t *) dev->dev_private;
|
|
|
struct drm_mode_config *mode_config = &dev->mode_config;
|
|
|
struct intel_encoder *encoder;
|
|
|
u32 hotplug_en;
|
|
|
|
|
|
- /* Note HDMI and DP share hotplug bits */
|
|
|
- hotplug_en = 0;
|
|
|
- list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
|
|
|
+ if (I915_HAS_HOTPLUG(dev)) {
|
|
|
+ hotplug_en = I915_READ(PORT_HOTPLUG_EN);
|
|
|
+ hotplug_en &= ~HOTPLUG_INT_EN_MASK;
|
|
|
+ /* Note HDMI and DP share hotplug bits */
|
|
|
/* enable bits are the same for all generations */
|
|
|
- hotplug_en |= hpd_mask_i915[encoder->hpd_pin];
|
|
|
- /* Programming the CRT detection parameters tends
|
|
|
- to generate a spurious hotplug event about three
|
|
|
- seconds later. So just do it once.
|
|
|
- */
|
|
|
- if (IS_G4X(dev))
|
|
|
- hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64;
|
|
|
- hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
|
|
|
-
|
|
|
- /* Ignore TV since it's buggy */
|
|
|
+ list_for_each_entry(encoder, &mode_config->encoder_list, base.head)
|
|
|
+ hotplug_en |= hpd_mask_i915[encoder->hpd_pin];
|
|
|
+ /* Programming the CRT detection parameters tends
|
|
|
+ to generate a spurious hotplug event about three
|
|
|
+ seconds later. So just do it once.
|
|
|
+ */
|
|
|
+ if (IS_G4X(dev))
|
|
|
+ hotplug_en |= CRT_HOTPLUG_ACTIVATION_PERIOD_64;
|
|
|
+ hotplug_en |= CRT_HOTPLUG_VOLTAGE_COMPARE_50;
|
|
|
|
|
|
- I915_WRITE(PORT_HOTPLUG_EN, hotplug_en);
|
|
|
+ /* Ignore TV since it's buggy */
|
|
|
+ I915_WRITE(PORT_HOTPLUG_EN, hotplug_en);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
static irqreturn_t i965_irq_handler(int irq, void *arg)
|
|
@@ -3008,7 +2991,7 @@ void intel_irq_init(struct drm_device *dev)
|
|
|
dev->driver->irq_postinstall = i965_irq_postinstall;
|
|
|
dev->driver->irq_uninstall = i965_irq_uninstall;
|
|
|
dev->driver->irq_handler = i965_irq_handler;
|
|
|
- dev_priv->display.hpd_irq_setup = i965_hpd_irq_setup;
|
|
|
+ dev_priv->display.hpd_irq_setup = i915_hpd_irq_setup;
|
|
|
}
|
|
|
dev->driver->enable_vblank = i915_enable_vblank;
|
|
|
dev->driver->disable_vblank = i915_disable_vblank;
|