linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Henrik Rydberg" <rydberg@bitmath.se>
To: Linus Torvalds <torvalds@linux-foundation.org>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>,
	David Airlie <airlied@linux.ie>,
	dri-devel@lists.freedesktop.org,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: Re: Linux 3.7-rc6
Date: Tue, 20 Nov 2012 11:39:05 +0100	[thread overview]
Message-ID: <20121120103905.GA3908@polaris.bitmath.org> (raw)
In-Reply-To: <CA+55aFxdin9yatcyRkTqG--fdBS-KHh0eXnK5RmONw_uJe8sfQ@mail.gmail.com>

>       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@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@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



  reply	other threads:[~2012-11-20 10:38 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-17  2:12 Linux 3.7-rc6 Linus Torvalds
2012-11-20 10:39 ` Henrik Rydberg [this message]
2012-11-21 11:55   ` Daniel Vetter
2012-11-21 17:55     ` Henrik Rydberg
2012-11-22 11:18     ` Henrik Rydberg
2012-11-22 13:10       ` Daniel Vetter
2012-11-22 18:23         ` Henrik Rydberg
2012-11-22 20:32           ` Daniel Vetter
2012-11-22 20:53             ` Henrik Rydberg
2012-11-23  9:53               ` Jani Nikula

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20121120103905.GA3908@polaris.bitmath.org \
    --to=rydberg@bitmath.se \
    --cc=airlied@linux.ie \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@linux-foundation.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).