[kernel/f20] drm/i915: Fix backlight regression caused by misconfigured VBT

Justin M. Forbes jforbes at fedoraproject.org
Tue Jul 1 15:32:00 UTC 2014


commit 305024aa2a492415514f184d59c874606a23bd93
Author: Justin M. Forbes <jforbes at redhat.com>
Date:   Tue Jul 1 10:32:06 2014 -0500

    drm/i915: Fix backlight regression caused by misconfigured VBT

 ...ix-backlight-regression-misconfigured-VBT.patch |   80 ++++++++++++++++++++
 kernel.spec                                        |    9 ++-
 2 files changed, 88 insertions(+), 1 deletions(-)
---
diff --git a/i915-fix-backlight-regression-misconfigured-VBT.patch b/i915-fix-backlight-regression-misconfigured-VBT.patch
new file mode 100644
index 0000000..0fa5b46
--- /dev/null
+++ b/i915-fix-backlight-regression-misconfigured-VBT.patch
@@ -0,0 +1,80 @@
+Hi All,
+
+This patch series (which I'm forwarding from the intel-gfx mailing list) fixes
+a bunch of backlight regressions in 3.15+ and as such should probably
+be added to the stabilization branch.
+
+I expect these to land in 3.16 soon enough, but just to be sure we should
+keep an eye on that too.
+
+Regards,
+
+Hans
+
+
+diff -ruNp a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
+--- a/drivers/gpu/drm/i915/i915_drv.h	2014-06-08 13:19:54.000000000 -0500
++++ b/drivers/gpu/drm/i915/i915_drv.h	2014-07-01 10:18:57.167645053 -0500
+@@ -803,6 +803,7 @@ enum intel_sbi_destination {
+ #define QUIRK_PIPEA_FORCE (1<<0)
+ #define QUIRK_LVDS_SSC_DISABLE (1<<1)
+ #define QUIRK_INVERT_BRIGHTNESS (1<<2)
++#define QUIRK_BACKLIGHT_PRESENT (1<<3)
+ 
+ struct intel_fbdev;
+ struct intel_fbc_work;
+diff -ruNp a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c
+--- a/drivers/gpu/drm/i915/intel_display.c	2014-07-01 10:17:06.084680359 -0500
++++ b/drivers/gpu/drm/i915/intel_display.c	2014-07-01 10:24:56.961768058 -0500
+@@ -11165,6 +11165,13 @@ static void quirk_invert_brightness(stru
+ 	dev_priv->quirks |= QUIRK_INVERT_BRIGHTNESS;
+ 	DRM_INFO("applying inverted panel brightness quirk\n");
+ }
++/* Some VBT's incorrectly indicate no backlight is present */
++static void quirk_backlight_present(struct drm_device *dev)
++{
++	struct drm_i915_private *dev_priv = dev->dev_private;
++	dev_priv->quirks |= QUIRK_BACKLIGHT_PRESENT;
++	DRM_INFO("applying backlight present quirk\n");
++}
+ 
+ struct intel_quirk {
+ 	int device;
+@@ -11237,6 +11244,18 @@ static struct intel_quirk intel_quirks[]
+ 
+ 	/* Acer Aspire 5336 */
+ 	{ 0x2a42, 0x1025, 0x048a, quirk_invert_brightness },
++
++	/* Acer C720 Chromebook has a controllable backlight */
++	{ 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
++
++	/* Dell 11 Chromebook */
++	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
++
++	/* HP 14 (Celeron 2955U) Chromebook */
++	{ 0x0a06, 0x103c, 0x21ed, quirk_backlight_present },
++
++	/* Toshiba CB35 Chromebook */
++	{ 0x0a06, 0x1179, 0x0a88, quirk_backlight_present },
+ };
+ 
+ static void intel_init_quirks(struct drm_device *dev)
+diff -ruNp a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
+--- a/drivers/gpu/drm/i915/intel_panel.c	2014-07-01 10:17:06.153680958 -0500
++++ b/drivers/gpu/drm/i915/intel_panel.c	2014-07-01 10:28:03.578386955 -0500
+@@ -1065,8 +1065,13 @@ int intel_panel_setup_backlight(struct d
+ 	int ret;
+ 
+ 	if (!dev_priv->vbt.backlight.present) {
+-		DRM_DEBUG_KMS("native backlight control not available per VBT\n");
+-		return 0;
++		if (dev_priv->quirks & QUIRK_BACKLIGHT_PRESENT) {
++			DRM_DEBUG_KMS("no backlight present per VBT, but "
++				      "present per quirk\n");
++		} else {
++			DRM_DEBUG_KMS("no backlight present per VBT\n");
++			return 0;
++		}
+ 	}
+ 
+ 	/* set level and max in panel struct */
diff --git a/kernel.spec b/kernel.spec
index 24d5a0a..9f5cfbf 100644
--- a/kernel.spec
+++ b/kernel.spec
@@ -760,6 +760,9 @@ Patch25111: netfilter-nf_nat-fix-oops-on-netns-removal.patch
 #rhbz 1114768
 Patch25112: 0001-synaptics-Add-min-max-quirk-for-pnp-id-LEN2002-Edge-.patch
 
+# https://bugs.freedesktop.org/show_bug.cgi?id=79813 submitted upstream
+Patch25113: i915-fix-backlight-regression-misconfigured-VBT.patch
+
 # END OF PATCH DEFINITIONS
 
 %endif
@@ -1479,6 +1482,9 @@ ApplyPatch netfilter-nf_nat-fix-oops-on-netns-removal.patch
 #rhbz 1114768
 ApplyPatch 0001-synaptics-Add-min-max-quirk-for-pnp-id-LEN2002-Edge-.patch
 
+# https://bugs.freedesktop.org/show_bug.cgi?id=79813 submitted upstream
+ApplyPatch i915-fix-backlight-regression-misconfigured-VBT.patch
+
 # END OF PATCH APPLICATIONS
 
 %endif
@@ -2290,8 +2296,9 @@ fi
 #                 ||----w |
 #                 ||     ||
 %changelog
-* Tue Jul  1 2014 Justin M. Forbes <jforbes at fedoraproject.org>
+* Tue Jul  1 2014 Justin M. Forbes <jforbes at fedoraproject.org> 3.15.3-200
 - Linux v3.15.3
+- drm/i915: Fix backlight regression caused by misconfigured VBT
 
 * Tue Jul  1 2014 Hans de Goede <hdegoede at redhat.com>
 - Add min/max quirk for the ThinkPad Edge E531 touchpad (rhbz#1114768)


More information about the scm-commits mailing list