public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915: Replicate BIOS eDP bpp clamping hack for hsw
@ 2013-11-18  6:38 Daniel Vetter
  2013-11-19 15:51 ` [Intel-gfx] " Ville Syrjälä
  0 siblings, 1 reply; 8+ messages in thread
From: Daniel Vetter @ 2013-11-18  6:38 UTC (permalink / raw)
  To: Intel Graphics Development; +Cc: Daniel Vetter, stable

Haswell's DDI encoders have their own ->get_config callback and in

commit c6cd2ee2d59111a07cd9199564c9bdcb2d11e5cf
Author: Jani Nikula <jani.nikula@intel.com>
Date:   Mon Oct 21 10:52:07 2013 +0300

    drm/i915/dp: workaround BIOS eDP bpp clamping issue

we've forgotten to replicate this hack. So let's do it that.

Note for backporters: The above commit and all it's depencies need to
be backported first.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=71049
Cc: stable@vger.kernel.org
Tested-by: Gökçen Eraslan <gokcen.eraslan@gmail.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
---
 drivers/gpu/drm/i915/intel_ddi.c | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c
index 1591576a6101..330077bcd0bd 100644
--- a/drivers/gpu/drm/i915/intel_ddi.c
+++ b/drivers/gpu/drm/i915/intel_ddi.c
@@ -1406,6 +1406,26 @@ void intel_ddi_get_config(struct intel_encoder *encoder,
 	default:
 		break;
 	}
+
+	if (encoder->type == INTEL_OUTPUT_EDP && 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_ddi_destroy(struct drm_encoder *encoder)
-- 
1.8.4.3

^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-20 10:50 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-11-18  6:38 [PATCH] drm/i915: Replicate BIOS eDP bpp clamping hack for hsw Daniel Vetter
2013-11-19 15:51 ` [Intel-gfx] " Ville Syrjälä
2013-11-19 16:01   ` Daniel Vetter
     [not found]   ` <24336_1384876863_528B8B3F_24336_14011_1_20131119160127.GC5794@phenom.ffwll.local>
2013-11-19 16:15     ` [PATCH] Added a lower limit for the watermark setting Thomas Richter
2013-11-19 16:41       ` Daniel Vetter
     [not found]       ` <24336_1384879265_528B94A1_24336_14365_1_20131119164139.GE5794@phenom.ffwll.local>
2013-11-20  9:18         ` Thomas Richter
2013-11-20  9:27           ` Daniel Vetter
     [not found]           ` <24336_1384939634_528C8071_24336_18909_1_CAKMK7uH2VXy05gW7yCpkzUCe9nO+e9XU+jYEq8RaNKOXj4G2iw@mail.gmail.com>
2013-11-20 10:50             ` Thomas Richter

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox