aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu
diff options
context:
space:
mode:
authorDave Airlie <airlied@gmail.com>2012-11-26 23:40:13 -0500
committerDave Airlie <airlied@gmail.com>2012-11-26 23:40:13 -0500
commitefc15e04886d4fdc57f580ec4ae049aece8973e7 (patch)
tree0ed020637b6d9648056e757f37b59797801ccca4 /drivers/gpu
parent9489e9dcae718d5fde988e4a684a0f55b5f94d17 (diff)
parent6567d748c4e94e3481e523803ec07ebd825c80d6 (diff)
Merge branch 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel
Daniel writes: - Unbreak mbp retina, this time with a much more fine-grained approach (since the previous "completely ignore edp vbt bpp value" regressed some machines even after fixing a bug in our dp bw code). - Disable cloning on sdvo. It just doesn't work (yeah took us a while to figure out), leading to jittery outputs in the best case. - Revert rc6 for ilk again. It seems to help a few of the gpu hang reporters at least, and it's definitely the best we've got. Head-against-the-wall-banging is still ongoing for what really breaks (and how we can reproduce the non-rc6 hangs and how to reproduce on gen4). * 'drm-intel-fixes' of git://people.freedesktop.org/~danvet/drm-intel: Revert "drm/i915: enable rc6 on ilk again" drm/i915: do not default to 18 bpp for eDP if missing from VBT drm/i915: disable cloning on sdvo
Diffstat (limited to 'drivers/gpu')
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c11
-rw-r--r--drivers/gpu/drm/i915/intel_display.c2
-rw-r--r--drivers/gpu/drm/i915/intel_pm.c12
-rw-r--r--drivers/gpu/drm/i915/intel_sdvo.c17
4 files changed, 16 insertions, 26 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 0ed6baff4b0c..56846ed5ee55 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -499,12 +499,8 @@ parse_edp(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
499 499
500 edp = find_section(bdb, BDB_EDP); 500 edp = find_section(bdb, BDB_EDP);
501 if (!edp) { 501 if (!edp) {
502 if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support) { 502 if (SUPPORTS_EDP(dev_priv->dev) && dev_priv->edp.support)
503 DRM_DEBUG_KMS("No eDP BDB found but eDP panel " 503 DRM_DEBUG_KMS("No eDP BDB found but eDP panel supported.\n");
504 "supported, assume %dbpp panel color "
505 "depth.\n",
506 dev_priv->edp.bpp);
507 }
508 return; 504 return;
509 } 505 }
510 506
@@ -657,9 +653,6 @@ init_vbt_defaults(struct drm_i915_private *dev_priv)
657 dev_priv->lvds_use_ssc = 1; 653 dev_priv->lvds_use_ssc = 1;
658 dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1); 654 dev_priv->lvds_ssc_freq = intel_bios_ssc_frequency(dev, 1);
659 DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq); 655 DRM_DEBUG_KMS("Set default to SSC at %dMHz\n", dev_priv->lvds_ssc_freq);
660
661 /* eDP data */
662 dev_priv->edp.bpp = 18;
663} 656}
664 657
665static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id) 658static int __init intel_no_opregion_vbt_callback(const struct dmi_system_id *id)
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4154bcd7a070..b426d44a2b05 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3845,7 +3845,7 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc,
3845 /* Use VBT settings if we have an eDP panel */ 3845 /* Use VBT settings if we have an eDP panel */
3846 unsigned int edp_bpc = dev_priv->edp.bpp / 3; 3846 unsigned int edp_bpc = dev_priv->edp.bpp / 3;
3847 3847
3848 if (edp_bpc < display_bpc) { 3848 if (edp_bpc && edp_bpc < display_bpc) {
3849 DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc); 3849 DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc);
3850 display_bpc = edp_bpc; 3850 display_bpc = edp_bpc;
3851 } 3851 }
diff --git a/drivers/gpu/drm/i915/intel_pm.c b/drivers/gpu/drm/i915/intel_pm.c
index 72f41aaa71ff..442968f8b201 100644
--- a/drivers/gpu/drm/i915/intel_pm.c
+++ b/drivers/gpu/drm/i915/intel_pm.c
@@ -2373,15 +2373,9 @@ int intel_enable_rc6(const struct drm_device *dev)
2373 if (i915_enable_rc6 >= 0) 2373 if (i915_enable_rc6 >= 0)
2374 return i915_enable_rc6; 2374 return i915_enable_rc6;
2375 2375
2376 if (INTEL_INFO(dev)->gen == 5) { 2376 /* Disable RC6 on Ironlake */
2377#ifdef CONFIG_INTEL_IOMMU 2377 if (INTEL_INFO(dev)->gen == 5)
2378 /* Disable rc6 on ilk if VT-d is on. */ 2378 return 0;
2379 if (intel_iommu_gfx_mapped)
2380 return false;
2381#endif
2382 DRM_DEBUG_DRIVER("Ironlake: only RC6 available\n");
2383 return INTEL_RC6_ENABLE;
2384 }
2385 2379
2386 if (IS_HASWELL(dev)) { 2380 if (IS_HASWELL(dev)) {
2387 DRM_DEBUG_DRIVER("Haswell: only RC6 available\n"); 2381 DRM_DEBUG_DRIVER("Haswell: only RC6 available\n");
diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index c600fb06e25e..a6ac0b416964 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -2201,7 +2201,6 @@ intel_sdvo_dvi_init(struct intel_sdvo *intel_sdvo, int device)
2201 connector->connector_type = DRM_MODE_CONNECTOR_HDMIA; 2201 connector->connector_type = DRM_MODE_CONNECTOR_HDMIA;
2202 intel_sdvo->is_hdmi = true; 2202 intel_sdvo->is_hdmi = true;
2203 } 2203 }
2204 intel_sdvo->base.cloneable = true;
2205 2204
2206 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); 2205 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2207 if (intel_sdvo->is_hdmi) 2206 if (intel_sdvo->is_hdmi)
@@ -2232,7 +2231,6 @@ intel_sdvo_tv_init(struct intel_sdvo *intel_sdvo, int type)
2232 2231
2233 intel_sdvo->is_tv = true; 2232 intel_sdvo->is_tv = true;
2234 intel_sdvo->base.needs_tv_clock = true; 2233 intel_sdvo->base.needs_tv_clock = true;
2235 intel_sdvo->base.cloneable = false;
2236 2234
2237 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); 2235 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2238 2236
@@ -2275,8 +2273,6 @@ intel_sdvo_analog_init(struct intel_sdvo *intel_sdvo, int device)
2275 intel_sdvo_connector->output_flag = SDVO_OUTPUT_RGB1; 2273 intel_sdvo_connector->output_flag = SDVO_OUTPUT_RGB1;
2276 } 2274 }
2277 2275
2278 intel_sdvo->base.cloneable = true;
2279
2280 intel_sdvo_connector_init(intel_sdvo_connector, 2276 intel_sdvo_connector_init(intel_sdvo_connector,
2281 intel_sdvo); 2277 intel_sdvo);
2282 return true; 2278 return true;
@@ -2307,9 +2303,6 @@ intel_sdvo_lvds_init(struct intel_sdvo *intel_sdvo, int device)
2307 intel_sdvo_connector->output_flag = SDVO_OUTPUT_LVDS1; 2303 intel_sdvo_connector->output_flag = SDVO_OUTPUT_LVDS1;
2308 } 2304 }
2309 2305
2310 /* SDVO LVDS is not cloneable because the input mode gets adjusted by the encoder */
2311 intel_sdvo->base.cloneable = false;
2312
2313 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo); 2306 intel_sdvo_connector_init(intel_sdvo_connector, intel_sdvo);
2314 if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector)) 2307 if (!intel_sdvo_create_enhance_property(intel_sdvo, intel_sdvo_connector))
2315 goto err; 2308 goto err;
@@ -2721,6 +2714,16 @@ bool intel_sdvo_init(struct drm_device *dev, uint32_t sdvo_reg, bool is_sdvob)
2721 goto err_output; 2714 goto err_output;
2722 } 2715 }
2723 2716
2717 /*
2718 * Cloning SDVO with anything is often impossible, since the SDVO
2719 * encoder can request a special input timing mode. And even if that's
2720 * not the case we have evidence that cloning a plain unscaled mode with
2721 * VGA doesn't really work. Furthermore the cloning flags are way too
2722 * simplistic anyway to express such constraints, so just give up on
2723 * cloning for SDVO encoders.
2724 */
2725 intel_sdvo->base.cloneable = false;
2726
2724 /* Only enable the hotplug irq if we need it, to work around noisy 2727 /* Only enable the hotplug irq if we need it, to work around noisy
2725 * hotplug lines. 2728 * hotplug lines.
2726 */ 2729 */