aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index eb31fdf758e8..4b7735196cd5 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -160,19 +160,20 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
160 struct drm_i915_private *dev_priv = dev->dev_private; 160 struct drm_i915_private *dev_priv = dev->dev_private;
161 u32 adpa, temp; 161 u32 adpa, temp;
162 bool ret; 162 bool ret;
163 bool turn_off_dac = false;
163 164
164 temp = adpa = I915_READ(PCH_ADPA); 165 temp = adpa = I915_READ(PCH_ADPA);
165 166
166 if (HAS_PCH_CPT(dev)) { 167 if (HAS_PCH_SPLIT(dev))
167 /* Disable DAC before force detect */ 168 turn_off_dac = true;
168 I915_WRITE(PCH_ADPA, adpa & ~ADPA_DAC_ENABLE); 169
169 (void)I915_READ(PCH_ADPA); 170 adpa &= ~ADPA_CRT_HOTPLUG_MASK;
170 } else { 171 if (turn_off_dac)
171 adpa &= ~ADPA_CRT_HOTPLUG_MASK; 172 adpa &= ~ADPA_DAC_ENABLE;
172 /* disable HPD first */ 173
173 I915_WRITE(PCH_ADPA, adpa); 174 /* disable HPD first */
174 (void)I915_READ(PCH_ADPA); 175 I915_WRITE(PCH_ADPA, adpa);
175 } 176 (void)I915_READ(PCH_ADPA);
176 177
177 adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 | 178 adpa |= (ADPA_CRT_HOTPLUG_PERIOD_128 |
178 ADPA_CRT_HOTPLUG_WARMUP_10MS | 179 ADPA_CRT_HOTPLUG_WARMUP_10MS |
@@ -189,7 +190,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
189 1000, 1)) 190 1000, 1))
190 DRM_ERROR("timed out waiting for FORCE_TRIGGER"); 191 DRM_ERROR("timed out waiting for FORCE_TRIGGER");
191 192
192 if (HAS_PCH_CPT(dev)) { 193 if (turn_off_dac) {
193 I915_WRITE(PCH_ADPA, temp); 194 I915_WRITE(PCH_ADPA, temp);
194 (void)I915_READ(PCH_ADPA); 195 (void)I915_READ(PCH_ADPA);
195 } 196 }