drm/i915: remove Pineview EOS protection support
authorShaohua Li <shaohua.li@intel.com>
Wed, 14 Oct 2009 09:19:28 +0000 (17:19 +0800)
committerEric Anholt <eric@anholt.net>
Mon, 30 Nov 2009 17:42:12 +0000 (09:42 -0800)
HW guys have an evaluation about the impact about EOS, and say the impact
is quite small, so they have removed EOS detection support. This patch
removes EOS feature.

revert commit 043029655816ed4cfc2ed247020ef97e5d637392
directly reverting it gives a hunk error, so please use this one.

Signed-off-by: Shaohua Li <shaohua.li@intel.com>
Signed-off-by: Eric Anholt <eric@anholt.net>
[anholt: fixed up commit message for update that the feature's really gone]

drivers/gpu/drm/i915/i915_irq.c
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_crt.c

index 024fb954db37c9f98fb3df10aac62f217daa9e56..77bc1d28f744692e2dbcadb954af90c91d8ce411 100644 (file)
@@ -622,27 +622,6 @@ irqreturn_t i915_driver_irq_handler(DRM_IRQ_ARGS)
 
                        I915_WRITE(PORT_HOTPLUG_STAT, hotplug_status);
                        I915_READ(PORT_HOTPLUG_STAT);
-
-                       /* EOS interrupts occurs */
-                       if (IS_IGD(dev) &&
-                               (hotplug_status & CRT_EOS_INT_STATUS)) {
-                               u32 temp;
-
-                               DRM_DEBUG_DRIVER("EOS interrupt occurs\n");
-                               /* status is already cleared */
-                               temp = I915_READ(ADPA);
-                               temp &= ~ADPA_DAC_ENABLE;
-                               I915_WRITE(ADPA, temp);
-
-                               temp = I915_READ(PORT_HOTPLUG_EN);
-                               temp &= ~CRT_EOS_INT_EN;
-                               I915_WRITE(PORT_HOTPLUG_EN, temp);
-
-                               temp = I915_READ(PORT_HOTPLUG_STAT);
-                               if (temp & CRT_EOS_INT_STATUS)
-                                       I915_WRITE(PORT_HOTPLUG_STAT,
-                                               CRT_EOS_INT_STATUS);
-                       }
                }
 
                I915_WRITE(IIR, iir);
index b11a682a4cff9bcf01e72fc3f6766647e3212a99..d58f7ad91161c07f692d5cc2f38899b76cd7688f 100644 (file)
 #define   SDVOB_HOTPLUG_INT_EN                 (1 << 26)
 #define   SDVOC_HOTPLUG_INT_EN                 (1 << 25)
 #define   TV_HOTPLUG_INT_EN                    (1 << 18)
-#define   CRT_EOS_INT_EN                       (1 << 10)
 #define   CRT_HOTPLUG_INT_EN                   (1 << 9)
 #define   CRT_HOTPLUG_FORCE_DETECT             (1 << 3)
 #define CRT_HOTPLUG_ACTIVATION_PERIOD_32       (0 << 8)
 #define   DPC_HOTPLUG_INT_STATUS               (1 << 28)
 #define   HDMID_HOTPLUG_INT_STATUS             (1 << 27)
 #define   DPD_HOTPLUG_INT_STATUS               (1 << 27)
-#define   CRT_EOS_INT_STATUS                   (1 << 12)
 #define   CRT_HOTPLUG_INT_STATUS               (1 << 11)
 #define   TV_HOTPLUG_INT_STATUS                        (1 << 10)
 #define   CRT_HOTPLUG_MONITOR_MASK             (3 << 8)
index 9b48a4465c38df005352f82a6aabf712eaf82caf..0864a2c40856181aa035cff406cd6e5ed3f01e72 100644 (file)
@@ -64,34 +64,6 @@ static void intel_crt_dpms(struct drm_encoder *encoder, int mode)
        }
 
        I915_WRITE(reg, temp);
-
-       if (IS_IGD(dev)) {
-               if (mode == DRM_MODE_DPMS_OFF) {
-                       /* turn off DAC */
-                       temp = I915_READ(PORT_HOTPLUG_EN);
-                       temp &= ~CRT_EOS_INT_EN;
-                       I915_WRITE(PORT_HOTPLUG_EN, temp);
-
-                       temp = I915_READ(PORT_HOTPLUG_STAT);
-                       if (temp & CRT_EOS_INT_STATUS)
-                               I915_WRITE(PORT_HOTPLUG_STAT,
-                                       CRT_EOS_INT_STATUS);
-               } else {
-                       /* turn on DAC. EOS interrupt must be enabled after DAC
-                        * is enabled, so it sounds not good to enable it in
-                        * i915_driver_irq_postinstall()
-                        * wait 12.5ms after DAC is enabled
-                        */
-                       msleep(13);
-                       temp = I915_READ(PORT_HOTPLUG_STAT);
-                       if (temp & CRT_EOS_INT_STATUS)
-                               I915_WRITE(PORT_HOTPLUG_STAT,
-                                       CRT_EOS_INT_STATUS);
-                       temp = I915_READ(PORT_HOTPLUG_EN);
-                       temp |= CRT_EOS_INT_EN;
-                       I915_WRITE(PORT_HOTPLUG_EN, temp);
-               }
-       }
 }
 
 static int intel_crt_mode_valid(struct drm_connector *connector,