aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.c1
-rw-r--r--drivers/gpu/drm/i915/i915_gem.c37
-rw-r--r--drivers/gpu/drm/i915/i915_gem_evict.c9
-rw-r--r--drivers/gpu/drm/i915/i915_suspend.c36
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c10
-rw-r--r--drivers/gpu/drm/i915/intel_display.c8
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c2
-rw-r--r--drivers/gpu/drm/i915/intel_dvo.c3
-rw-r--r--drivers/gpu/drm/i915/intel_hdmi.c2
-rw-r--r--drivers/gpu/drm/i915/intel_lvds.c7
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c5
-rw-r--r--drivers/gpu/drm/i915/intel_tv.c11
12 files changed, 91 insertions, 40 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c
index dffc1bcf7b79..13dca9da6507 100644
--- a/drivers/gpu/drm/i915/i915_drv.c
+++ b/drivers/gpu/drm/i915/i915_drv.c
@@ -182,6 +182,7 @@ static const struct pci_device_id pciidlist[] = { /* aka */
182 INTEL_VGA_DEVICE(0x2e22, &intel_g45_info), /* G45_G */ 182 INTEL_VGA_DEVICE(0x2e22, &intel_g45_info), /* G45_G */
183 INTEL_VGA_DEVICE(0x2e32, &intel_g45_info), /* G41_G */ 183 INTEL_VGA_DEVICE(0x2e32, &intel_g45_info), /* G41_G */
184 INTEL_VGA_DEVICE(0x2e42, &intel_g45_info), /* B43_G */ 184 INTEL_VGA_DEVICE(0x2e42, &intel_g45_info), /* B43_G */
185 INTEL_VGA_DEVICE(0x2e92, &intel_g45_info), /* B43_G.1 */
185 INTEL_VGA_DEVICE(0xa001, &intel_pineview_info), 186 INTEL_VGA_DEVICE(0xa001, &intel_pineview_info),
186 INTEL_VGA_DEVICE(0xa011, &intel_pineview_info), 187 INTEL_VGA_DEVICE(0xa011, &intel_pineview_info),
187 INTEL_VGA_DEVICE(0x0042, &intel_ironlake_d_info), 188 INTEL_VGA_DEVICE(0x0042, &intel_ironlake_d_info),
diff --git a/drivers/gpu/drm/i915/i915_gem.c b/drivers/gpu/drm/i915/i915_gem.c
index a83574df096e..0355cd28b270 100644
--- a/drivers/gpu/drm/i915/i915_gem.c
+++ b/drivers/gpu/drm/i915/i915_gem.c
@@ -2350,14 +2350,21 @@ i915_gem_object_get_fence_reg(struct drm_gem_object *obj,
2350 2350
2351 reg->obj = obj; 2351 reg->obj = obj;
2352 2352
2353 if (IS_GEN6(dev)) 2353 switch (INTEL_INFO(dev)->gen) {
2354 case 6:
2354 sandybridge_write_fence_reg(reg); 2355 sandybridge_write_fence_reg(reg);
2355 else if (IS_I965G(dev)) 2356 break;
2357 case 5:
2358 case 4:
2356 i965_write_fence_reg(reg); 2359 i965_write_fence_reg(reg);
2357 else if (IS_I9XX(dev)) 2360 break;
2361 case 3:
2358 i915_write_fence_reg(reg); 2362 i915_write_fence_reg(reg);
2359 else 2363 break;
2364 case 2:
2360 i830_write_fence_reg(reg); 2365 i830_write_fence_reg(reg);
2366 break;
2367 }
2361 2368
2362 trace_i915_gem_object_get_fence(obj, obj_priv->fence_reg, 2369 trace_i915_gem_object_get_fence(obj, obj_priv->fence_reg,
2363 obj_priv->tiling_mode); 2370 obj_priv->tiling_mode);
@@ -2380,22 +2387,26 @@ i915_gem_clear_fence_reg(struct drm_gem_object *obj)
2380 struct drm_i915_gem_object *obj_priv = to_intel_bo(obj); 2387 struct drm_i915_gem_object *obj_priv = to_intel_bo(obj);
2381 struct drm_i915_fence_reg *reg = 2388 struct drm_i915_fence_reg *reg =
2382 &dev_priv->fence_regs[obj_priv->fence_reg]; 2389 &dev_priv->fence_regs[obj_priv->fence_reg];
2390 uint32_t fence_reg;
2383 2391
2384 if (IS_GEN6(dev)) { 2392 switch (INTEL_INFO(dev)->gen) {
2393 case 6:
2385 I915_WRITE64(FENCE_REG_SANDYBRIDGE_0 + 2394 I915_WRITE64(FENCE_REG_SANDYBRIDGE_0 +
2386 (obj_priv->fence_reg * 8), 0); 2395 (obj_priv->fence_reg * 8), 0);
2387 } else if (IS_I965G(dev)) { 2396 break;
2397 case 5:
2398 case 4:
2388 I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0); 2399 I915_WRITE64(FENCE_REG_965_0 + (obj_priv->fence_reg * 8), 0);
2389 } else { 2400 break;
2390 uint32_t fence_reg; 2401 case 3:
2391 2402 if (obj_priv->fence_reg > 8)
2392 if (obj_priv->fence_reg < 8) 2403 fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg - 8) * 4;
2393 fence_reg = FENCE_REG_830_0 + obj_priv->fence_reg * 4;
2394 else 2404 else
2395 fence_reg = FENCE_REG_945_8 + (obj_priv->fence_reg - 2405 case 2:
2396 8) * 4; 2406 fence_reg = FENCE_REG_830_0 + obj_priv->fence_reg * 4;
2397 2407
2398 I915_WRITE(fence_reg, 0); 2408 I915_WRITE(fence_reg, 0);
2409 break;
2399 } 2410 }
2400 2411
2401 reg->obj = NULL; 2412 reg->obj = NULL;
diff --git a/drivers/gpu/drm/i915/i915_gem_evict.c b/drivers/gpu/drm/i915/i915_gem_evict.c
index 82430e21c7ab..63ac3d2ba52c 100644
--- a/drivers/gpu/drm/i915/i915_gem_evict.c
+++ b/drivers/gpu/drm/i915/i915_gem_evict.c
@@ -79,6 +79,7 @@ mark_free(struct drm_i915_gem_object *obj_priv,
79 struct list_head *unwind) 79 struct list_head *unwind)
80{ 80{
81 list_add(&obj_priv->evict_list, unwind); 81 list_add(&obj_priv->evict_list, unwind);
82 drm_gem_object_reference(&obj_priv->base);
82 return drm_mm_scan_add_block(obj_priv->gtt_space); 83 return drm_mm_scan_add_block(obj_priv->gtt_space);
83} 84}
84 85
@@ -165,6 +166,7 @@ i915_gem_evict_something(struct drm_device *dev, int min_size, unsigned alignmen
165 list_for_each_entry(obj_priv, &unwind_list, evict_list) { 166 list_for_each_entry(obj_priv, &unwind_list, evict_list) {
166 ret = drm_mm_scan_remove_block(obj_priv->gtt_space); 167 ret = drm_mm_scan_remove_block(obj_priv->gtt_space);
167 BUG_ON(ret); 168 BUG_ON(ret);
169 drm_gem_object_unreference(&obj_priv->base);
168 } 170 }
169 171
170 /* We expect the caller to unpin, evict all and try again, or give up. 172 /* We expect the caller to unpin, evict all and try again, or give up.
@@ -181,18 +183,21 @@ found:
181 * scanning, therefore store to be evicted objects on a 183 * scanning, therefore store to be evicted objects on a
182 * temporary list. */ 184 * temporary list. */
183 list_move(&obj_priv->evict_list, &eviction_list); 185 list_move(&obj_priv->evict_list, &eviction_list);
184 } 186 } else
187 drm_gem_object_unreference(&obj_priv->base);
185 } 188 }
186 189
187 /* Unbinding will emit any required flushes */ 190 /* Unbinding will emit any required flushes */
188 list_for_each_entry_safe(obj_priv, tmp_obj_priv, 191 list_for_each_entry_safe(obj_priv, tmp_obj_priv,
189 &eviction_list, evict_list) { 192 &eviction_list, evict_list) {
190#if WATCH_LRU 193#if WATCH_LRU
191 DRM_INFO("%s: evicting %p\n", __func__, obj); 194 DRM_INFO("%s: evicting %p\n", __func__, &obj_priv->base);
192#endif 195#endif
193 ret = i915_gem_object_unbind(&obj_priv->base); 196 ret = i915_gem_object_unbind(&obj_priv->base);
194 if (ret) 197 if (ret)
195 return ret; 198 return ret;
199
200 drm_gem_object_unreference(&obj_priv->base);
196 } 201 }
197 202
198 /* The just created free hole should be on the top of the free stack 203 /* The just created free hole should be on the top of the free stack
diff --git a/drivers/gpu/drm/i915/i915_suspend.c b/drivers/gpu/drm/i915/i915_suspend.c
index 5c0de6501828..967dcde312b2 100644
--- a/drivers/gpu/drm/i915/i915_suspend.c
+++ b/drivers/gpu/drm/i915/i915_suspend.c
@@ -789,16 +789,25 @@ int i915_save_state(struct drm_device *dev)
789 dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2)); 789 dev_priv->saveSWF2[i] = I915_READ(SWF30 + (i << 2));
790 790
791 /* Fences */ 791 /* Fences */
792 if (IS_I965G(dev)) { 792 switch (INTEL_INFO(dev)->gen) {
793 case 6:
794 for (i = 0; i < 16; i++)
795 dev_priv->saveFENCE[i] = I915_READ64(FENCE_REG_SANDYBRIDGE_0 + (i * 8));
796 break;
797 case 5:
798 case 4:
793 for (i = 0; i < 16; i++) 799 for (i = 0; i < 16; i++)
794 dev_priv->saveFENCE[i] = I915_READ64(FENCE_REG_965_0 + (i * 8)); 800 dev_priv->saveFENCE[i] = I915_READ64(FENCE_REG_965_0 + (i * 8));
795 } else { 801 break;
796 for (i = 0; i < 8; i++) 802 case 3:
797 dev_priv->saveFENCE[i] = I915_READ(FENCE_REG_830_0 + (i * 4));
798
799 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) 803 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
800 for (i = 0; i < 8; i++) 804 for (i = 0; i < 8; i++)
801 dev_priv->saveFENCE[i+8] = I915_READ(FENCE_REG_945_8 + (i * 4)); 805 dev_priv->saveFENCE[i+8] = I915_READ(FENCE_REG_945_8 + (i * 4));
806 case 2:
807 for (i = 0; i < 8; i++)
808 dev_priv->saveFENCE[i] = I915_READ(FENCE_REG_830_0 + (i * 4));
809 break;
810
802 } 811 }
803 812
804 return 0; 813 return 0;
@@ -815,15 +824,24 @@ int i915_restore_state(struct drm_device *dev)
815 I915_WRITE(HWS_PGA, dev_priv->saveHWS); 824 I915_WRITE(HWS_PGA, dev_priv->saveHWS);
816 825
817 /* Fences */ 826 /* Fences */
818 if (IS_I965G(dev)) { 827 switch (INTEL_INFO(dev)->gen) {
828 case 6:
829 for (i = 0; i < 16; i++)
830 I915_WRITE64(FENCE_REG_SANDYBRIDGE_0 + (i * 8), dev_priv->saveFENCE[i]);
831 break;
832 case 5:
833 case 4:
819 for (i = 0; i < 16; i++) 834 for (i = 0; i < 16; i++)
820 I915_WRITE64(FENCE_REG_965_0 + (i * 8), dev_priv->saveFENCE[i]); 835 I915_WRITE64(FENCE_REG_965_0 + (i * 8), dev_priv->saveFENCE[i]);
821 } else { 836 break;
822 for (i = 0; i < 8; i++) 837 case 3:
823 I915_WRITE(FENCE_REG_830_0 + (i * 4), dev_priv->saveFENCE[i]); 838 case 2:
824 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev)) 839 if (IS_I945G(dev) || IS_I945GM(dev) || IS_G33(dev))
825 for (i = 0; i < 8; i++) 840 for (i = 0; i < 8; i++)
826 I915_WRITE(FENCE_REG_945_8 + (i * 4), dev_priv->saveFENCE[i+8]); 841 I915_WRITE(FENCE_REG_945_8 + (i * 4), dev_priv->saveFENCE[i+8]);
842 for (i = 0; i < 8; i++)
843 I915_WRITE(FENCE_REG_830_0 + (i * 4), dev_priv->saveFENCE[i]);
844 break;
827 } 845 }
828 846
829 i915_restore_display(dev); 847 i915_restore_display(dev);
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index 8b782ee63085..6d3385511663 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -188,7 +188,7 @@ static bool intel_ironlake_crt_detect_hotplug(struct drm_connector *connector)
188 188
189 if (wait_for((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) == 0, 189 if (wait_for((I915_READ(PCH_ADPA) & ADPA_CRT_HOTPLUG_FORCE_TRIGGER) == 0,
190 1000)) 190 1000))
191 DRM_ERROR("timed out waiting for FORCE_TRIGGER"); 191 DRM_DEBUG_KMS("timed out waiting for FORCE_TRIGGER");
192 192
193 if (turn_off_dac) { 193 if (turn_off_dac) {
194 I915_WRITE(PCH_ADPA, temp); 194 I915_WRITE(PCH_ADPA, temp);
@@ -245,7 +245,7 @@ static bool intel_crt_detect_hotplug(struct drm_connector *connector)
245 if (wait_for((I915_READ(PORT_HOTPLUG_EN) & 245 if (wait_for((I915_READ(PORT_HOTPLUG_EN) &
246 CRT_HOTPLUG_FORCE_DETECT) == 0, 246 CRT_HOTPLUG_FORCE_DETECT) == 0,
247 1000)) 247 1000))
248 DRM_ERROR("timed out waiting for FORCE_DETECT to go off"); 248 DRM_DEBUG_KMS("timed out waiting for FORCE_DETECT to go off");
249 } 249 }
250 250
251 stat = I915_READ(PORT_HOTPLUG_STAT); 251 stat = I915_READ(PORT_HOTPLUG_STAT);
@@ -402,7 +402,8 @@ intel_crt_load_detect(struct drm_crtc *crtc, struct intel_encoder *intel_encoder
402 return status; 402 return status;
403} 403}
404 404
405static enum drm_connector_status intel_crt_detect(struct drm_connector *connector) 405static enum drm_connector_status
406intel_crt_detect(struct drm_connector *connector, bool force)
406{ 407{
407 struct drm_device *dev = connector->dev; 408 struct drm_device *dev = connector->dev;
408 struct intel_encoder *encoder = intel_attached_encoder(connector); 409 struct intel_encoder *encoder = intel_attached_encoder(connector);
@@ -420,6 +421,9 @@ static enum drm_connector_status intel_crt_detect(struct drm_connector *connecto
420 if (intel_crt_detect_ddc(&encoder->base)) 421 if (intel_crt_detect_ddc(&encoder->base))
421 return connector_status_connected; 422 return connector_status_connected;
422 423
424 if (!force)
425 return connector->status;
426
423 /* for pre-945g platforms use load detect */ 427 /* for pre-945g platforms use load detect */
424 if (encoder->base.crtc && encoder->base.crtc->enabled) { 428 if (encoder->base.crtc && encoder->base.crtc->enabled) {
425 status = intel_crt_load_detect(encoder->base.crtc, encoder); 429 status = intel_crt_load_detect(encoder->base.crtc, encoder);
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 86ea3890aa8a..1b5d878be975 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -2539,11 +2539,19 @@ static bool intel_crtc_mode_fixup(struct drm_crtc *crtc,
2539 struct drm_display_mode *adjusted_mode) 2539 struct drm_display_mode *adjusted_mode)
2540{ 2540{
2541 struct drm_device *dev = crtc->dev; 2541 struct drm_device *dev = crtc->dev;
2542
2542 if (HAS_PCH_SPLIT(dev)) { 2543 if (HAS_PCH_SPLIT(dev)) {
2543 /* FDI link clock is fixed at 2.7G */ 2544 /* FDI link clock is fixed at 2.7G */
2544 if (mode->clock * 3 > IRONLAKE_FDI_FREQ * 4) 2545 if (mode->clock * 3 > IRONLAKE_FDI_FREQ * 4)
2545 return false; 2546 return false;
2546 } 2547 }
2548
2549 /* XXX some encoders set the crtcinfo, others don't.
2550 * Obviously we need some form of conflict resolution here...
2551 */
2552 if (adjusted_mode->crtc_htotal == 0)
2553 drm_mode_set_crtcinfo(adjusted_mode, 0);
2554
2547 return true; 2555 return true;
2548} 2556}
2549 2557
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 9a87ec5175e6..ec26ee7ca992 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1437,7 +1437,7 @@ ironlake_dp_detect(struct drm_connector *connector)
1437 * \return false if DP port is disconnected. 1437 * \return false if DP port is disconnected.
1438 */ 1438 */
1439static enum drm_connector_status 1439static enum drm_connector_status
1440intel_dp_detect(struct drm_connector *connector) 1440intel_dp_detect(struct drm_connector *connector, bool force)
1441{ 1441{
1442 struct intel_dp *intel_dp = intel_attached_dp(connector); 1442 struct intel_dp *intel_dp = intel_attached_dp(connector);
1443 struct drm_device *dev = intel_dp->base.base.dev; 1443 struct drm_device *dev = intel_dp->base.base.dev;
diff --git a/drivers/gpu/drm/i915/intel_dvo.c b/drivers/gpu/drm/i915/intel_dvo.c
index 1ee0dbbf6ee1..ad28bc4fb732 100644
--- a/drivers/gpu/drm/i915/intel_dvo.c
+++ b/drivers/gpu/drm/i915/intel_dvo.c
@@ -227,7 +227,8 @@ static void intel_dvo_mode_set(struct drm_encoder *encoder,
227 * 227 *
228 * Unimplemented. 228 * Unimplemented.
229 */ 229 */
230static enum drm_connector_status intel_dvo_detect(struct drm_connector *connector) 230static enum drm_connector_status
231intel_dvo_detect(struct drm_connector *connector, bool force)
231{ 232{
232 struct intel_dvo *intel_dvo = intel_attached_dvo(connector); 233 struct intel_dvo *intel_dvo = intel_attached_dvo(connector);
233 return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev); 234 return intel_dvo->dev.dev_ops->detect(&intel_dvo->dev);
diff --git a/drivers/gpu/drm/i915/intel_hdmi.c b/drivers/gpu/drm/i915/intel_hdmi.c
index f814cb035e01..9fb9501f2d07 100644
--- a/drivers/gpu/drm/i915/intel_hdmi.c
+++ b/drivers/gpu/drm/i915/intel_hdmi.c
@@ -146,7 +146,7 @@ static bool intel_hdmi_mode_fixup(struct drm_encoder *encoder,
146} 146}
147 147
148static enum drm_connector_status 148static enum drm_connector_status
149intel_hdmi_detect(struct drm_connector *connector) 149intel_hdmi_detect(struct drm_connector *connector, bool force)
150{ 150{
151 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector); 151 struct intel_hdmi *intel_hdmi = intel_attached_hdmi(connector);
152 struct drm_i915_private *dev_priv = connector->dev->dev_private; 152 struct drm_i915_private *dev_priv = connector->dev->dev_private;
diff --git a/drivers/gpu/drm/i915/intel_lvds.c b/drivers/gpu/drm/i915/intel_lvds.c
index 9177c17853e5..f6a72cbb152d 100644
--- a/drivers/gpu/drm/i915/intel_lvds.c
+++ b/drivers/gpu/drm/i915/intel_lvds.c
@@ -453,7 +453,8 @@ static void intel_lvds_mode_set(struct drm_encoder *encoder,
453 * connected and closed means disconnected. We also send hotplug events as 453 * connected and closed means disconnected. We also send hotplug events as
454 * needed, using lid status notification from the input layer. 454 * needed, using lid status notification from the input layer.
455 */ 455 */
456static enum drm_connector_status intel_lvds_detect(struct drm_connector *connector) 456static enum drm_connector_status
457intel_lvds_detect(struct drm_connector *connector, bool force)
457{ 458{
458 struct drm_device *dev = connector->dev; 459 struct drm_device *dev = connector->dev;
459 enum drm_connector_status status = connector_status_connected; 460 enum drm_connector_status status = connector_status_connected;
@@ -534,7 +535,9 @@ static int intel_lid_notify(struct notifier_block *nb, unsigned long val,
534 * the LID nofication event. 535 * the LID nofication event.
535 */ 536 */
536 if (connector) 537 if (connector)
537 connector->status = connector->funcs->detect(connector); 538 connector->status = connector->funcs->detect(connector,
539 false);
540
538 /* Don't force modeset on machines where it causes a GPU lockup */ 541 /* Don't force modeset on machines where it causes a GPU lockup */
539 if (dmi_check_system(intel_no_modeset_on_lid)) 542 if (dmi_check_system(intel_no_modeset_on_lid))
540 return NOTIFY_OK; 543 return NOTIFY_OK;
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 2b3b4754c97d..ba058e600ce7 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -1421,7 +1421,7 @@ intel_analog_is_connected(struct drm_device *dev)
1421 if (!analog_connector) 1421 if (!analog_connector)
1422 return false; 1422 return false;
1423 1423
1424 if (analog_connector->funcs->detect(analog_connector) == 1424 if (analog_connector->funcs->detect(analog_connector, false) ==
1425 connector_status_disconnected) 1425 connector_status_disconnected)
1426 return false; 1426 return false;
1427 1427
@@ -1490,7 +1490,8 @@ intel_sdvo_hdmi_sink_detect(struct drm_connector *connector)
1490 return status; 1490 return status;
1491} 1491}
1492 1492
1493static enum drm_connector_status intel_sdvo_detect(struct drm_connector *connector) 1493static enum drm_connector_status
1494intel_sdvo_detect(struct drm_connector *connector, bool force)
1494{ 1495{
1495 uint16_t response; 1496 uint16_t response;
1496 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector); 1497 struct intel_sdvo *intel_sdvo = intel_attached_sdvo(connector);
diff --git a/drivers/gpu/drm/i915/intel_tv.c b/drivers/gpu/drm/i915/intel_tv.c
index e819cadd5f46..e03783fbbf95 100644
--- a/drivers/gpu/drm/i915/intel_tv.c
+++ b/drivers/gpu/drm/i915/intel_tv.c
@@ -1341,7 +1341,7 @@ static void intel_tv_find_better_format(struct drm_connector *connector)
1341 * we have a pipe programmed in order to probe the TV. 1341 * we have a pipe programmed in order to probe the TV.
1342 */ 1342 */
1343static enum drm_connector_status 1343static enum drm_connector_status
1344intel_tv_detect(struct drm_connector *connector) 1344intel_tv_detect(struct drm_connector *connector, bool force)
1345{ 1345{
1346 struct drm_display_mode mode; 1346 struct drm_display_mode mode;
1347 struct intel_tv *intel_tv = intel_attached_tv(connector); 1347 struct intel_tv *intel_tv = intel_attached_tv(connector);
@@ -1352,7 +1352,7 @@ intel_tv_detect(struct drm_connector *connector)
1352 1352
1353 if (intel_tv->base.base.crtc && intel_tv->base.base.crtc->enabled) { 1353 if (intel_tv->base.base.crtc && intel_tv->base.base.crtc->enabled) {
1354 type = intel_tv_detect_type(intel_tv); 1354 type = intel_tv_detect_type(intel_tv);
1355 } else { 1355 } else if (force) {
1356 struct drm_crtc *crtc; 1356 struct drm_crtc *crtc;
1357 int dpms_mode; 1357 int dpms_mode;
1358 1358
@@ -1363,10 +1363,9 @@ intel_tv_detect(struct drm_connector *connector)
1363 intel_release_load_detect_pipe(&intel_tv->base, connector, 1363 intel_release_load_detect_pipe(&intel_tv->base, connector,
1364 dpms_mode); 1364 dpms_mode);
1365 } else 1365 } else
1366 type = -1; 1366 return connector_status_unknown;
1367 } 1367 } else
1368 1368 return connector->status;
1369 intel_tv->type = type;
1370 1369
1371 if (type < 0) 1370 if (type < 0)
1372 return connector_status_disconnected; 1371 return connector_status_disconnected;