From patchwork Tue Nov 20 10:39:05 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Henrik Rydberg X-Patchwork-Id: 1775241 Return-Path: X-Original-To: patchwork-dri-devel@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by patchwork2.kernel.org (Postfix) with ESMTP id 06FEFDFF38 for ; Tue, 20 Nov 2012 18:37:56 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id EE293E6426 for ; Tue, 20 Nov 2012 10:37:55 -0800 (PST) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org X-Greylist: delayed 394 seconds by postgrey-1.32 at gabe; Tue, 20 Nov 2012 02:45:30 PST Received: from csmtp3.one.com (csmtp3.one.com [91.198.169.23]) by gabe.freedesktop.org (Postfix) with ESMTP id 67A0EE6294 for ; Tue, 20 Nov 2012 02:45:30 -0800 (PST) Received: from polaris (vbg-gw.proceranetworks.com [194.153.91.5]) by csmtp3.one.com (Postfix) with ESMTPA id 54E56240E808; Tue, 20 Nov 2012 10:38:53 +0000 (UTC) Received: by polaris (sSMTP sendmail emulation); Tue, 20 Nov 2012 11:39:05 +0100 From: "Henrik Rydberg" Date: Tue, 20 Nov 2012 11:39:05 +0100 To: Linus Torvalds Subject: Re: Linux 3.7-rc6 Message-ID: <20121120103905.GA3908@polaris.bitmath.org> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) X-Mailman-Approved-At: Tue, 20 Nov 2012 10:30:47 -0800 Cc: Daniel Vetter , Linux Kernel Mailing List , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org Errors-To: dri-devel-bounces+patchwork-dri-devel=patchwork.kernel.org@lists.freedesktop.org > 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 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 --- 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;