[Intel-gfx] [PATCH] drm/i915: Workaround CRT detect issue for Ironlake

Zhenyu Wang zhenyuw at linux.intel.com
Wed Dec 9 03:04:13 CET 2009


We found when VGA port is on before detect sequence, it
could cause infinite polling loop in checking hotplug
status. This workaround trys to disable analog port before
detect, then after detect restore back the origin state.

Cc: Stable Team <stable at kernel.org>
Signed-off-by: Zhenyu Wang <zhenyuw at linux.intel.com>
---
 drivers/gpu/drm/i915/intel_crt.c |   13 +++++++++++--
 1 files changed, 11 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index e505144..602aeba 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -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;
 }
 
-- 
1.6.3.3




More information about the Intel-gfx mailing list