Patchwork [quantal] Revert "drm/i915: ignore eDP bpc settings from vbt"

login
register
mail settings
Submitter Robert Hooker
Date Oct. 25, 2012, 3:11 p.m.
Message ID <1351177885-24442-1-git-send-email-sarvatt@ubuntu.com>
Download mbox | patch
Permalink /patch/194209/
State New
Headers show

Comments

Robert Hooker - Oct. 25, 2012, 3:11 p.m.
From: Robert Hooker <robert.hooker@canonical.com>

BugLink: http://bugs.launchpad.net/bugs/1070978

This commit breaks display bringup on a recent Lenovo eDP machine.

This reverts commit 33fbdc047b30be3781d0b861adb6ef96fa052355.

Signed-off-by: Robert Hooker <robert.hooker@canonical.com>
---
 drivers/gpu/drm/i915/intel_display.c |   11 +++++++++++
 1 file changed, 11 insertions(+)

Patch

diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
index bc68a86..cf791d8 100644
--- a/drivers/gpu/drm/i915/intel_display.c
+++ b/drivers/gpu/drm/i915/intel_display.c
@@ -3602,6 +3602,17 @@  static bool intel_choose_pipe_bpp_dither(struct drm_crtc *crtc,
 			continue;
 		}
 
+		if (intel_encoder->type == INTEL_OUTPUT_EDP) {
+			/* Use VBT settings if we have an eDP panel */
+			unsigned int edp_bpc = dev_priv->edp.bpp / 3;
+
+			if (edp_bpc < display_bpc) {
+				DRM_DEBUG_KMS("clamping display bpc (was %d) to eDP (%d)\n", display_bpc, edp_bpc);
+				display_bpc = edp_bpc;
+			}
+			continue;
+		}
+
 		/* Not one of the known troublemakers, check the EDID */
 		list_for_each_entry(connector, &dev->mode_config.connector_list,
 				    head) {