Linux 3.7-rc6

Henrik Rydberg rydberg at bitmath.se
Tue Nov 20 02:39:05 PST 2012


>       drm/i915: do not ignore eDP bpc settings from vbt

As advertised, this patch breaks the Macbook Pro Retina, which seems
unfair. The patch below is certainly not the best remedy, but it does
work. Tested on a MacbookPro10,1.

Thanks,
Henrik

---

From: Henrik Rydberg <rydberg at euromail.se>
Date: Tue, 20 Nov 2012 11:16:05 +0100
Subject: [PATCH] drm/i915: Ignore eDP bpc settings from vbt based on dmi data
Status: O
Content-Length: 1637
Lines: 51

Commit 2f4f649a6 breaks the Retina display on MacBookPro10 laptops.
This patch reintroduces the logic reverted by that patch, but only
for the Retina machines.

Signed-off-by: Henrik Rydberg <rydberg at euromail.se>
---
 drivers/gpu/drm/i915/intel_display.c | 21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index 4154bcd..97658d1 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3776,6 +3776,24 @@ static inline bool intel_panel_use_ssc(struct drm_i915_private *dev_priv)
 		&& !(dev_priv->quirks & QUIRK_LVDS_SSC_DISABLE);
 }
 
+static int dmi_ignore_bpc_from_vbt_callback(const struct dmi_system_id *id)
+{
+	DRM_INFO("Ignoring bpc from vbt on %s\n", id->ident);
+	return 1;
+}
+
+static const struct dmi_system_id dmi_ignore_bpc_from_vbt[] = {
+	{
+		.callback = dmi_ignore_bpc_from_vbt_callback,
+		.ident = "Apple MacBook Pro Retina",
+		.matches = {
+			DMI_MATCH(DMI_SYS_VENDOR, "Apple Inc."),
+			DMI_MATCH(DMI_PRODUCT_NAME, "MacBookPro10"),
+		},
+	},
+	{ }	/* terminating entry */
+};
+
 /**
  * intel_choose_pipe_bpp_dither - figure out what color depth the pipe should send
  * @crtc: CRTC structure
@@ -3841,7 +3859,8 @@ static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc,
 			}
 		}
 
-		if (intel_encoder->type == INTEL_OUTPUT_EDP) {
+		if (intel_encoder->type == INTEL_OUTPUT_EDP &&
+			!dmi_check_system(dmi_ignore_bpc_from_vbt)) {
 			/* Use VBT settings if we have an eDP panel */
 			unsigned int edp_bpc = dev_priv->edp.bpp / 3;
 
-- 
1.8.0




More information about the dri-devel mailing list