stable.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Ulf Winkelvos <ulf@winkelvos.de>,
	jkp <jkp@iki.fi>, Jani Nikula <jani.nikula@intel.com>,
	Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [PATCH 3.11 17/25] drm/i915/dp: workaround BIOS eDP bpp clamping issue
Date: Mon, 18 Nov 2013 10:40:46 -0800	[thread overview]
Message-ID: <20131118184037.414769228@linuxfoundation.org> (raw)
In-Reply-To: <20131118184032.248465920@linuxfoundation.org>

3.11-stable review patch.  If anyone has any objections, please let me know.

------------------

From: Jani Nikula <jani.nikula@intel.com>

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf upstream.

This isn't a real fix to the problem, but rather a stopgap measure while
trying to find a proper solution.

There are several laptops out there that fail to light up the eDP panel
in UEFI boot mode. They seem to be mostly IVB machines, including but
apparently not limited to Dell XPS 13, Asus TX300, Asus UX31A, Asus
UX32VD, Acer Aspire S7. They seem to work in CSM or legacy boot.

The difference between UEFI and CSM is that the BIOS provides a
different VBT to the kernel. The UEFI VBT typically specifies 18 bpp and
1.62 GHz link for eDP, while CSM VBT has 24 bpp and 2.7 GHz link. We end
up clamping to 18 bpp in UEFI mode, which we can fit in the 1.62 Ghz
link, and for reasons yet unknown fail to light up the panel.

Dithering from 24 to 18 bpp itself seems to work; if we use 18 bpp with
2.7 GHz link, the eDP panel lights up. So essentially this is a link
speed issue, and *not* a bpp clamping issue.

The bug raised its head since
commit 657445fe8660100ad174600ebfa61536392b7624
Author: Daniel Vetter <daniel.vetter@ffwll.ch>
Date:   Sat May 4 10:09:18 2013 +0200

    Revert "drm/i915: revert eDP bpp clamping code changes"

which started clamping bpp *before* computing the link requirements, and
thus affecting the required bandwidth. Clamping after the computations
kept the link at 2.7 GHz.

Even though the BIOS tells us to use 18 bpp through the VBT, it happily
boots up at 24 bpp and 2.7 GHz itself! Use this information to
selectively ignore the VBT provided value.

We can't ignore the VBT eDP bpp altogether, as there are other laptops
that do require the clamping to be used due to EDID reporting higher bpp
than the panel can support.

Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=59841
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=67950
Tested-by: Ulf Winkelvos <ulf@winkelvos.de>
Tested-by: jkp <jkp@iki.fi>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
[Jani: stable 3.11 backport]
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/gpu/drm/i915/intel_dp.c |   20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1389,6 +1389,26 @@ static void intel_dp_get_config(struct i
 	}
 
 	pipe_config->adjusted_mode.flags |= flags;
+
+	if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp &&
+	    pipe_config->pipe_bpp > dev_priv->vbt.edp_bpp) {
+		/*
+		 * This is a big fat ugly hack.
+		 *
+		 * Some machines in UEFI boot mode provide us a VBT that has 18
+		 * bpp and 1.62 GHz link bandwidth for eDP, which for reasons
+		 * unknown we fail to light up. Yet the same BIOS boots up with
+		 * 24 bpp and 2.7 GHz link. Use the same bpp as the BIOS uses as
+		 * max, not what it tells us to use.
+		 *
+		 * Note: This will still be broken if the eDP panel is not lit
+		 * up by the BIOS, and thus we can't get the mode at module
+		 * load.
+		 */
+		DRM_DEBUG_KMS("pipe has %d bpp for eDP panel, overriding BIOS-provided max %d bpp\n",
+			      pipe_config->pipe_bpp, dev_priv->vbt.edp_bpp);
+		dev_priv->vbt.edp_bpp = pipe_config->pipe_bpp;
+	}
 }
 
 static void intel_disable_dp(struct intel_encoder *encoder)



  parent reply	other threads:[~2013-11-18 18:40 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-18 18:40 [PATCH 3.11 00/25] 3.11.9-stable review Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 01/25] net/mlx4_core: Fix call to __mlx4_unregister_mac Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 02/25] net: sctp: do not trigger BUG_ON in sctp_cmd_delete_tcb Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 03/25] net: flow_dissector: fail on evil iph->ihl Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 04/25] virtio-net: correctly handle cpu hotplug notifier during resuming Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 05/25] xen-netback: use jiffies_64 value to calculate credit timeout Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 06/25] cxgb3: Fix length calculation in write_ofld_wr() on 32-bit architectures Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 07/25] tcp: gso: fix truesize tracking Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 08/25] ipv6: ip6_dst_check needs to check for expired dst_entries Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 09/25] ipv6: reset dst.expires value when clearing expire flag Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 10/25] xen-netback: Handle backend state transitions in a more robust way Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 11/25] xen-netback: transition to CLOSED when removing a VIF Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 12/25] Thermal: x86_pkg_temp: change spin lock Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 13/25] hyperv-fb: add pci stub Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 14/25] USB: add new zte 3g-dongles pid to option.c Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 15/25] ALSA: hda - hdmi: Fix reported channel map on common default layouts Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 16/25] tracing: Fix potential out-of-bounds in trace_get_user() Greg Kroah-Hartman
2013-11-18 18:40 ` Greg Kroah-Hartman [this message]
2013-11-18 18:40 ` [PATCH 3.11 18/25] perf: Fix perf ring buffer memory ordering Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 19/25] iwlwifi: pcie: add new SKUs for 7000 & 3160 NIC series Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 20/25] misc: atmel_pwm: add deferred-probing support Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 21/25] backlight: atmel-pwm-bl: fix deferred probe from __init Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 22/25] usb: fix cleanup after failure in hub_configure() Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 23/25] usb: fail on usb_hub_create_port_device() errors Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 24/25] usbcore: set lpm_capable field for LPM capable root hubs Greg Kroah-Hartman
2013-11-18 18:40 ` [PATCH 3.11 25/25] media: sh_vou: almost forever loop in sh_vou_try_fmt_vid_out() Greg Kroah-Hartman
2013-11-19  3:09 ` [PATCH 3.11 00/25] 3.11.9-stable review Guenter Roeck
2013-11-20 11:06 ` Satoru Takeuchi
2013-11-20 15:26 ` Shuah Khan

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=20131118184037.414769228@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=daniel.vetter@ffwll.ch \
    --cc=jani.nikula@intel.com \
    --cc=jkp@iki.fi \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=ulf@winkelvos.de \
    /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).