[Bug 59841] [IVB cpu eDP] panel is broken due to 657445fe86 (eDP bpp clamping)

bugzilla-daemon at bugzilla.kernel.org bugzilla-daemon at bugzilla.kernel.org
Mon Sep 2 09:18:09 PDT 2013


https://bugzilla.kernel.org/show_bug.cgi?id=59841

--- Comment #101 from jkp <jkp at iki.fi> ---
Here's a patch which contains both the boot param (same as the previous patch)
and a device-specific quirk for the TX300, so that no manual user intervention
is required. Other devices could be added the same with with ids from output of
lspic -nn -v. 

Problem with this approach might be that there may be devices with the same
controller but a 18 bpp panel?

# lspci -nn -v

00:02.0 VGA compatible controller [0300]: Intel Corporation 3rd Gen Core
processor Graphics Controller [8086:0166] (rev 09) (prog-if 00 [VGA contro
ller])
    Subsystem: ASUSTeK Computer Inc. Device [1043:15b7]


diff -ur linux-3.11-rc7.virgin/drivers/gpu/drm/i915/i915_drv.c
linux-3.11-rc7/drivers/gpu/drm/i915/i915_drv.c
--- linux-3.11-rc7.virgin/drivers/gpu/drm/i915/i915_drv.c    2013-08-26
03:43:22.000000000 +0300
+++ linux-3.11-rc7/drivers/gpu/drm/i915/i915_drv.c    2013-09-02
16:56:09.971164152 +0300
@@ -132,6 +132,10 @@
 module_param_named(enable_ips, i915_enable_ips, int, 0600);
 MODULE_PARM_DESC(enable_ips, "Enable IPS (default: true)");

+bool i915_ignore_edp_bpp __read_mostly = false;
+module_param_named(i915_ignore_edp_bpp, i915_ignore_edp_bpp, bool, 0600);
+MODULE_PARM_DESC(i915_ignore_edp_bpp, "Ignore BDB edp BPP value (default:
false)");
+
 static struct drm_driver driver;
 extern int intel_agp_enabled;

diff -ur linux-3.11-rc7.virgin/drivers/gpu/drm/i915/i915_drv.h
linux-3.11-rc7/drivers/gpu/drm/i915/i915_drv.h
--- linux-3.11-rc7.virgin/drivers/gpu/drm/i915/i915_drv.h    2013-08-26
03:43:22.000000000 +0300
+++ linux-3.11-rc7/drivers/gpu/drm/i915/i915_drv.h    2013-09-02
18:24:35.361345416 +0300
@@ -556,6 +556,7 @@
 #define QUIRK_LVDS_SSC_DISABLE (1<<1)
 #define QUIRK_INVERT_BRIGHTNESS (1<<2)
 #define QUIRK_NO_PCH_PWM_ENABLE (1<<3)
+#define QUIRK_INCORRECT_EDP_BPP_ENABLE (1<<4)

 struct intel_fbdev;
 struct intel_fbc_work;
@@ -1543,6 +1544,7 @@
 extern unsigned int i915_preliminary_hw_support __read_mostly;
 extern int i915_disable_power_well __read_mostly;
 extern int i915_enable_ips __read_mostly;
+extern bool i915_ignore_edp_bpp __read_mostly;

 extern int i915_suspend(struct drm_device *dev, pm_message_t state);
 extern int i915_resume(struct drm_device *dev);
diff -ur linux-3.11-rc7.virgin/drivers/gpu/drm/i915/intel_display.c
linux-3.11-rc7/drivers/gpu/drm/i915/intel_display.c
--- linux-3.11-rc7.virgin/drivers/gpu/drm/i915/intel_display.c    2013-08-26
03:43:22.000000000 +0300
+++ linux-3.11-rc7/drivers/gpu/drm/i915/intel_display.c    2013-09-02
18:47:32.830767498 +0300
@@ -9413,6 +9413,16 @@
     DRM_INFO("applying no-PCH_PWM_ENABLE quirk\n");
 }

+/*
+ * Some machines (e.g. Asus TX300) incorrectly return 18bpp in UEFI mode
+ * from vbe edp data
+ */
+static void quirk_incorrect_edp_bpp_enable(struct drm_device *dev)
+{
+    struct drm_i915_private *dev_priv = dev->dev_private;
+    dev_priv->quirks |= QUIRK_INCORRECT_EDP_BPP_ENABLE;
+    DRM_INFO("applying INCORRECT_EDP_BPP_ENABLE quirk\n");
+}
 struct intel_quirk {
     int device;
     int subsystem_vendor;
@@ -9487,6 +9497,9 @@
     { 0x0116, 0x1028, 0x052e, quirk_no_pcm_pwm_enable },
     /* Dell XPS13 HD and XPS13 FHD Ivy Bridge */
     { 0x0166, 0x1028, 0x058b, quirk_no_pcm_pwm_enable },
+
+    /* Asus TX300 15b7 */
+    { 0x0166, 0x1043, 0x15b7, quirk_incorrect_edp_bpp_enable },
 };

 static void intel_init_quirks(struct drm_device *dev)
diff -ur linux-3.11-rc7.virgin/drivers/gpu/drm/i915/intel_dp.c
linux-3.11-rc7/drivers/gpu/drm/i915/intel_dp.c
--- linux-3.11-rc7.virgin/drivers/gpu/drm/i915/intel_dp.c    2013-08-26
03:43:22.000000000 +0300
+++ linux-3.11-rc7/drivers/gpu/drm/i915/intel_dp.c    2013-09-02
18:31:36.649356698 +0300
@@ -710,7 +710,8 @@
     /* Walk through all bpp values. Luckily they're all nicely spaced with 2
      * bpc in between. */
     bpp = pipe_config->pipe_bpp;
-    if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp)
+    if (is_edp(intel_dp) && dev_priv->vbt.edp_bpp && !i915_ignore_edp_bpp
+        && !(dev_priv->quirks & QUIRK_INCORRECT_EDP_BPP_ENABLE))
         bpp = min_t(int, bpp, dev_priv->vbt.edp_bpp);

     for (; bpp >= 6*3; bpp -= 2*3) {

-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the intel-gfx-bugs mailing list