Commit d5dd96cb authored by Dave Airlie's avatar Dave Airlie Committed by Eric Anholt

i915: disable DAC on Ironlake also when doing CRT load detection.

Like on Sandybridge, disabling the DAC here when doing CRT load detect
avoids forever hangs waiting on the hardware.

test procedure on HP 2740p:
boot with no VGA plugged in, start X,
plug in VGA monitor (1280x1024)
chvt 3
machine hangs waiting forever.
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: default avatarEric Anholt <eric@anholt.net>
parent 9d0498a2
...@@ -160,19 +160,20 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector) ...@@ -160,19 +160,20 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
u32 adpa, temp; u32 adpa, temp;
bool ret; bool ret;
bool turn_off_dac = false;
temp = adpa = I915_READ(PCH_ADPA); temp = adpa = I915_READ(PCH_ADPA);
if (HAS_PCH_CPT(dev)) { if (HAS_PCH_SPLIT(dev))
/* Disable DAC before force detect */ turn_off_dac = true;
I915_WRITE(PCH_ADPA, adpa & ~ADPA_DAC_ENABLE);
(void)I915_READ(PCH_ADPA);
} else {
adpa &= ~ADPA_CRT_HOTPLUG_MASK; adpa &= ~ADPA_CRT_HOTPLUG_MASK;
if (turn_off_dac)
adpa &= ~ADPA_DAC_ENABLE;
/* disable HPD first */ /* disable HPD first */
I915_WRITE(PCH_ADPA, adpa); I915_WRITE(PCH_ADPA, adpa);
(void)I915_READ(PCH_ADPA); (void)I915_READ(PCH_ADPA);
}
adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 | adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 |
ADPA_CRT_HOTPLUG_WARMUP_10MS | ADPA_CRT_HOTPLUG_WARMUP_10MS |
...@@ -189,7 +190,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector) ...@@ -189,7 +190,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
1000, 1)) 1000, 1))
DRM_ERROR("timed out waiting for FORCE_TRIGGER"); DRM_ERROR("timed out waiting for FORCE_TRIGGER");
if (HAS_PCH_CPT(dev)) { if (turn_off_dac) {
I915_WRITE(PCH_ADPA, temp); I915_WRITE(PCH_ADPA, temp);
(void)I915_READ(PCH_ADPA); (void)I915_READ(PCH_ADPA);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment