@@ -179,10 +179,16 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct drm_i915_private *dev_priv = dev->dev_private;
- u32 adpa;
+ u32 adpa, temp;
bool ret;
- adpa = I915_READ(PCH_ADPA);
+ temp = adpa = I915_READ(PCH_ADPA);
+
+ /* Workaround for detect issue, disable analog port before
+ * detect sequence, then restore the origin state after detect.
+ */
+ adpa &= ~ADPA_DAC_ENABLE;
+ I915_WRITE(PCH_ADPA, adpa);
adpa &= ~ADPA_CRT_HOTPLUG_MASK;
@@ -209,6 +215,9 @@ static bool intel_igdng_crt_detect_hotplug(struct drm_connector *connector)
else
ret = false;
+ /* restore origin state */
+ I915_WRITE(PCH_ADPA, temp);
+
return ret;
}