From 1480985eb1aa2960be46e6a1ab6f5bd34be30a3e Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Mon, 18 Nov 2013 08:44:45 -0800 Subject: [PATCH] 3.11-stable patches added patches: drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch --- ...rkaround-bios-edp-bpp-clamping-issue.patch | 87 +++++++++++++++++++ queue-3.11/series | 1 + 2 files changed, 88 insertions(+) create mode 100644 queue-3.11/drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch diff --git a/queue-3.11/drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch b/queue-3.11/drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch new file mode 100644 index 00000000000..cd2e63fa41d --- /dev/null +++ b/queue-3.11/drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch @@ -0,0 +1,87 @@ +From c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf Mon Sep 17 00:00:00 2001 +From: Jani Nikula +Date: Mon, 21 Oct 2013 10:52:07 +0300 +Subject: drm/i915/dp: workaround BIOS eDP bpp clamping issue + +From: Jani Nikula + +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 +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 +Tested-by: jkp +Signed-off-by: Jani Nikula +Signed-off-by: Daniel Vetter +[Jani: stable 3.11 backport] +Signed-off-by: Greg Kroah-Hartman +--- + 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) diff --git a/queue-3.11/series b/queue-3.11/series index f14755d87ca..c23d0369971 100644 --- a/queue-3.11/series +++ b/queue-3.11/series @@ -14,3 +14,4 @@ hyperv-fb-add-pci-stub.patch usb-add-new-zte-3g-dongle-s-pid-to-option.c.patch alsa-hda-hdmi-fix-reported-channel-map-on-common-default-layouts.patch tracing-fix-potential-out-of-bounds-in-trace_get_user.patch +drm-i915-dp-workaround-bios-edp-bpp-clamping-issue.patch -- 2.47.3