Skip to contentSkip to conversation

drm/i915: Fix backlight regression caused by misconfigured VBT

PATCH Superseded Scot Doyle 2 participants 18 messages Jun 27, 2014 – Jul 4, 2014

Subsystems (2)
lore
Share & tools
lore

Scot Doyle

author
#0 lore raw

cover drm/i915: Fix backlight regression caused by misconfigured VBT

commit c675949ec58ca50d5a3ae3c757892f1560f6e896
drm/i915: do not setup backlight if not available according to VBT

caused a regression on machines with a misconfigured VBT. Add a quirk to assert the presence of a controllable backlight, overriding the VBT. Then apply this quirk to four Haswell-based Chromebook laptops.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

author
#1 lore raw

PATCH 1/5 quirk asserts controllable backlight presence, overriding VBT

Add a quirk to assert the presence of a controllable backlight. Use it to ignore the VBT backlight presence check during backlight setup.

---

drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8cea596..723b1fe 100644
@@ -657,6 +657,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;
drivers/gpu/drm/i915/intel_display.c +8 -0
index 065984d..c583b07 100644
@@ -12290,6 +12290,14 @@ static void quirk_invert_brightness(struct drm_device *dev)
 	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;
 	int subsystem_vendor;
drivers/gpu/drm/i915/intel_panel.c +7 -2
index 38a9857..dfc6b5f 100644
@@ -1118,8 +1118,13 @@ int intel_panel_setup_backlight(struct drm_connector *connector)
 	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 */
Reviewed-by on v1 1/5
#2 lore raw

Re: [PATCH 1/5] quirk asserts controllable backlight presence, overriding VBT

Quoted 43 lines · Scot Doyle

Add a quirk to assert the presence of a controllable backlight. Use it to ignore the VBT backlight presence check during backlight setup.

---

drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8cea596..723b1fe 100644
@@ -657,6 +657,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;
drivers/gpu/drm/i915/intel_display.c +8 -0
index 065984d..c583b07 100644
@@ -12290,6 +12290,14 @@ static void quirk_invert_brightness(struct drm_device *dev)
  	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;
  	int subsystem_vendor;
drivers/gpu/drm/i915/intel_panel.c +0 -0
index 38a9857..dfc6b5f 100644

drivers/gpu/drm/i915/intel_panel.c int intel_panel_setup_backlight(struct drm_connector *connector) · line 1123

Quoted 8 lines
drivers/gpu/drm/i915/intel_panel.c +3 -2
@@ -1118,8 +1118,13 @@ int intel_panel_setup_backlight(struct drm_connector *connector)
  	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");

Usually strings are not wrapped so that you can grep the source for them.

Quoted 11 lines
drivers/gpu/drm/i915/intel_panel.c +4 -0
+		} else {
+			DRM_DEBUG_KMS("no backlight present per VBT\n");
+			return 0;
+		}
  	}
 
  	/* set level and max in panel struct */

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
author
#3 lore raw

PATCH 2/5 Acer C720 has a controllable backlight

In reply to Scot Doyle

The Acer C720 laptop has a controllable backlight although its VBT reports otherwise.

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index c583b07..2855d29 100644
@@ -12366,6 +12366,9 @@ 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 },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
author
#4 lore raw

PATCH 3/5 Dell 11 Chromebook has a controllable backlight

In reply to Scot Doyle

The Dell 11 Chromebook laptop has a controllable backlight although its VBT reports otherwise.

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 2855d29..2ac699b 100644
@@ -12369,6 +12369,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* Acer C720 Chromebook has a controllable backlight */
 	{ 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
+
+	/* Dell 11 Chromebook */
+	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
#5 lore raw

Re: [PATCH 3/5] Dell 11 Chromebook has a controllable backlight

Quoted 5 lines · Scot Doyle

The Dell 11 Chromebook laptop has a controllable backlight although its VBT reports otherwise.

Tested-bys on patches 3-4 would be awesome.

BR,
Jani.

Quoted 19 lines

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 2855d29..2ac699b 100644
@@ -12369,6 +12369,9 @@ static struct intel_quirk intel_quirks[] = {
 
  	/* Acer C720 Chromebook has a controllable backlight */
  	{ 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
+
+	/* Dell 11 Chromebook */
+	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
  };
 
  static void intel_init_quirks(struct drm_device *dev)

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
author
#6 lore raw

PATCH 4/5 HP 14 Chromebook has a controllable backlight

In reply to Scot Doyle

The HP 14 (Celeron 2955U) Chromebook laptop has a controllable backlight although its VBT reports otherwise.

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 2ac699b..89d9fe8 100644
@@ -12372,6 +12372,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* Dell 11 Chromebook */
 	{ 0x0a06, 0x1028, 0x0a35, quirk_backlight_present },
+
+	/* HP 14 (Celeron 2955U) Chromebook */
+	{ 0x0a06, 0x103c, 0x21ed, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
author
#7 lore raw

PATCH 5/5 Toshiba CB35 Chromebook has a controllable backlight

In reply to Scot Doyle

The Toshiba CB35 Chromebook laptop has a controllable backlight although its VBT reports otherwise.

Patch tested by author on Toshiba CB35.

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 89d9fe8..90c97d8 100644
@@ -12375,6 +12375,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* 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)
#8 lore raw
In reply to Scot Doyle
Quoted 8 lines · Scot Doyle

commit c675949ec58ca50d5a3ae3c757892f1560f6e896
drm/i915: do not setup backlight if not available according to VBT

caused a regression on machines with a misconfigured VBT. Add a quirk to assert the presence of a controllable backlight, overriding the VBT. Then apply this quirk to four Haswell-based Chromebook laptops.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

Oh, we'll want this stuff in the commit message of (at least) patch
1. No need to resend for this.

Thanks,
Jani.

Quoted 4 lines

_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center
author
#9 lore raw

v2 cover drm/i915: fix backlight regression caused by misconfigured VBT

In reply to Scot Doyle

Jani, here are the changes you suggested plus:

1) Against newer drm-intel-nightly
2) Added Acer C720P (touchscreen), tested by Michael
3) Removed HP 14 and Dell 11 Chromebooks since no testers yet
4) Clarified these are for the Haswell (Celeron 2955U) boards since upcoming Chromebooks may be same model with different board

author
#10 lore raw

PATCH v2 1/3 drm/i915: quirk asserts controllable backlight presence, overriding VBT

commit c675949ec58ca50d5a3ae3c757892f1560f6e896
drm/i915: do not setup backlight if not available according to VBT

caused a regression on machines with a misconfigured VBT. Add a quirk to assert the presence of a controllable backlight. Use it to ignore the VBT backlight presence check during backlight setup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---

drivers/gpu/drm/i915/i915_drv.h +1 -0
index 8cea596..723b1fe 100644
@@ -657,6 +657,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;
drivers/gpu/drm/i915/intel_display.c +8 -0
index 3badfbd..7b5f193 100644
@@ -12315,6 +12315,14 @@ static void quirk_invert_brightness(struct drm_device *dev)
 	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;
 	int subsystem_vendor;
drivers/gpu/drm/i915/intel_panel.c +6 -2
index 38a9857..628cd89 100644
@@ -1118,8 +1118,12 @@ int intel_panel_setup_backlight(struct drm_connector *connector)
 	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 */
author
#11 lore raw

PATCH v2 2/3 drm/i915: Acer C720 and C720P have controllable backlights

In reply to Scot Doyle

The Acer C720 and C720P Chromebooks (with Celeron 2955U CPU) have a controllable backlight although their VBT reports otherwise. Apply quirk to ignore the backlight presence check during backlight setup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 7b5f193..18089bf 100644
@@ -12391,6 +12391,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* Acer Aspire 5336 */
 	{ 0x2a42, 0x1025, 0x048a, quirk_invert_brightness },
+
+        /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */
+        { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
author
#12 lore raw

PATCH v2 3/3 drm/i915: Toshiba CB35 has a controllable backlight

In reply to Scot Doyle

The Toshiba CB35 Chromebook (with Celeron 2955U CPU) has a controllable backlight although its VBT reports otherwise. Apply quirk to ignore the backlight presence check during backlight setup.

Patch tested by author on Toshiba CB35.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---

drivers/gpu/drm/i915/intel_display.c +3 -0
index 18089bf..b3a99e9 100644
@@ -12394,6 +12394,9 @@ static struct intel_quirk intel_quirks[] = {
 
         /* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */
         { 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
+
+        /* Toshiba CB35 Chromebook (Celeron 2955U) */
+        { 0x0a06, 0x1179, 0x0a88, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
author
#14 lore raw

PATCH v3 1/3 drm/i915: quirk asserts controllable backlight presence, overriding VBT

commit c675949ec58ca50d5a3ae3c757892f1560f6e896
drm/i915: do not setup backlight if not available according to VBT

caused a regression on machines with a misconfigured VBT. Add a quirk to assert the presence of a controllable backlight. Use it to ignore the VBT backlight presence check during backlight setup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---
 drivers/gpu/drm/i915/i915_drv.h      |    1 +
 drivers/gpu/drm/i915/intel_display.c |    8 ++++++++
 drivers/gpu/drm/i915/intel_panel.c   |    8 ++++++--
 3 files changed, 15 insertions(+), 2 deletions(-)
drivers/gpu/drm/i915/i915_drv.h +1 -0
index 9953ea8..ac06c0f 100644
@@ -658,6 +658,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;
drivers/gpu/drm/i915/intel_display.c +8 -0
index a72b55f..fae289f 100644
@@ -12315,6 +12315,14 @@ static void quirk_invert_brightness(struct drm_device *dev)
 	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;
 	int subsystem_vendor;
drivers/gpu/drm/i915/intel_panel.c +6 -2
index 38a9857..628cd89 100644
@@ -1118,8 +1118,12 @@ int intel_panel_setup_backlight(struct drm_connector *connector)
 	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 */
Signature · 1 line
1.7.10.4
author
#15 lore raw

PATCH v3 2/3 drm/i915: Acer C720 and C720P have controllable backlights

In reply to Scot Doyle

The Acer C720 and C720P Chromebooks (with Celeron 2955U CPU) have a controllable backlight although their VBT reports otherwise. Apply quirk to ignore the backlight presence check during backlight setup.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---
 drivers/gpu/drm/i915/intel_display.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_display.c +3 -0
index fae289f..7345441 100644
@@ -12391,6 +12391,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* Acer Aspire 5336 */
 	{ 0x2a42, 0x1025, 0x048a, quirk_invert_brightness },
+
+	/* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */
+	{ 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
Signature · 1 line
1.7.10.4
author
#16 lore raw

PATCH v3 3/3 drm/i915: Toshiba CB35 has a controllable backlight

In reply to Scot Doyle

The Toshiba CB35 Chromebook (with Celeron 2955U CPU) has a controllable backlight although its VBT reports otherwise. Apply quirk to ignore the backlight presence check during backlight setup.

Patch tested by author on Toshiba CB35.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=79813

---
 drivers/gpu/drm/i915/intel_display.c |    3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/i915/intel_display.c +3 -0
index 7345441..c12a5da 100644
@@ -12394,6 +12394,9 @@ static struct intel_quirk intel_quirks[] = {
 
 	/* Acer C720 and C720P Chromebooks (Celeron 2955U) have backlights */
 	{ 0x0a06, 0x1025, 0x0a11, quirk_backlight_present },
+
+	/* Toshiba CB35 Chromebook (Celeron 2955U) */
+	{ 0x0a06, 0x1179, 0x0a88, quirk_backlight_present },
 };
 
 static void intel_init_quirks(struct drm_device *dev)
Signature · 1 line
1.7.10.4
Applied
#17 lore raw

Re: [PATCH v3 0/3] drm/i915: fix backlight regression caused by misconfigured VBT

In reply to Scot Doyle
Quoted 1 line · Scot Doyle

Submitted with git to correct whitespace problems.

Pushed to drm-intel-fixes, thanks for the patches.

BR,
Jani.

Signature · 1 line
Jani Nikula, Intel Open Source Technology Center