drm/i915: Fix backlight regression caused by misconfigured VBT
Subsystems (2)
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
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
@@ -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
@@ -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
@@ -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 */
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.
Tested-by James Duley <[email protected]>Signed-off-by Scot Doyle <[email protected]>CC Jani Nikula <[email protected]>---
drivers/gpu/drm/i915/i915_drv.h +1
-0@@ -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@@ -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
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
PATCH 2/5 Acer C720 has a controllable backlight
In reply to Scot DoyleThe Acer C720 laptop has a controllable backlight although its VBT reports otherwise.
---
drivers/gpu/drm/i915/intel_display.c +3 -0
@@ -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)
PATCH 3/5 Dell 11 Chromebook has a controllable backlight
In reply to Scot DoyleThe Dell 11 Chromebook laptop has a controllable backlight although its VBT reports otherwise.
---
drivers/gpu/drm/i915/intel_display.c +3 -0
@@ -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)
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.
Signed-off-by Scot Doyle <[email protected]>CC Jani Nikula <[email protected]>
Tested-bys on patches 3-4 would be awesome.
BR,
Jani.
Quoted 19 lines
---
drivers/gpu/drm/i915/intel_display.c +3
-0@@ -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
PATCH 4/5 HP 14 Chromebook has a controllable backlight
In reply to Scot DoyleThe HP 14 (Celeron 2955U) Chromebook laptop has a controllable backlight although its VBT reports otherwise.
---
drivers/gpu/drm/i915/intel_display.c +3 -0
@@ -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)
PATCH 5/5 Toshiba CB35 Chromebook has a controllable backlight
In reply to Scot DoyleThe 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
@@ -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)
Quoted 8 lines · Scot Doyle
commit
c675949ec58ca50d5a3ae3c757892f1560f6e896
drm/i915: do not setup backlight if not available according to VBTcaused 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
v2 cover drm/i915: fix backlight regression caused by misconfigured VBT
In reply to Scot DoyleJani, 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
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
@@ -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
@@ -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
@@ -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 */
PATCH v2 2/3 drm/i915: Acer C720 and C720P have controllable backlights
In reply to Scot DoyleThe 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
@@ -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)
PATCH v2 3/3 drm/i915: Toshiba CB35 has a controllable backlight
In reply to Scot DoyleThe 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
@@ -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)
v3 cover drm/i915: fix backlight regression caused by misconfigured VBT
In reply to Scot DoyleSubmitted with git to correct whitespace problems.
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
@@ -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
@@ -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
@@ -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
PATCH v3 2/3 drm/i915: Acer C720 and C720P have controllable backlights
In reply to Scot DoyleThe 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
@@ -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
PATCH v3 3/3 drm/i915: Toshiba CB35 has a controllable backlight
In reply to Scot DoyleThe 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
@@ -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
Jani Nikula
AppliedRe: [PATCH v3 0/3] drm/i915: fix backlight regression caused by misconfigured VBT
In reply to Scot DoyleQuoted 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