]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - drivers/gpu/drm/i915/intel_crt.c
drm/i915: fix gpio register detection logic for BIOS without VBT
[karo-tx-linux.git] / drivers / gpu / drm / i915 / intel_crt.c
index 212e22740fc123e4a569a1e84e7445ae8a9de135..477a61c5402bd558fda68c7e1dffd5c88267ed0a 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,
@@ -194,7 +166,7 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
                        ADPA_CRT_HOTPLUG_ENABLE |
                        ADPA_CRT_HOTPLUG_FORCE_TRIGGER);
 
-       DRM_DEBUG("pch crt adpa 0x%x", adpa);
+       DRM_DEBUG_KMS("pch crt adpa 0x%x", adpa);
        I915_WRITE(PCH_ADPA, adpa);
 
        while ((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) != 0)
@@ -554,7 +526,7 @@ void intel_crt_init(struct drm_device *dev)
        else {
                i2c_reg = GPIOA;
                /* Use VBT information for CRT DDC if available */
-               if (dev_priv->crt_ddc_bus != -1)
+               if (dev_priv->crt_ddc_bus != 0)
                        i2c_reg = dev_priv->crt_ddc_bus;
        }
        intel_output->ddc_bus = intel_i2c_create(dev, i2c_reg, "CRTDDC_A");