drm/i915: Fix inconsistent backlight level during disabled
Subsystems (2)
PATCH 1/1 drm/i915: Fix inconsistent backlight level during disabled
When the brightness property is inquired while the backlight is disabled, the driver returns a wrong value (zero) because it probes the value after the backlight was turned off. This caused a black screen even after the backlight is enabled again. It should return the internal backlight_level instead, so that it won't be influenced by the backlight-enable state.
--- drivers/gpu/drm/i915/intel_panel.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
drivers/gpu/drm/i915/intel_panel.c +2 -1
@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)static int intel_panel_get_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); -return intel_panel_get_backlight (dev); +struct drm_i915_private *dev_priv = dev->dev_private; +return dev_priv->backlight_level; }static const struct backlight_ops intel_panel_bl_ops = {
Signature · 1 line
1.7.7
Quoted 18 lines
drivers/gpu/drm/i915/intel_panel.c +2
-1@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)static int intel_panel_get_brightness (struct backlight_device *bd) { struct drm_device *dev = bl_get_data(bd); - return intel_panel_get_backlight(dev); + struct drm_i915_private *dev_priv = dev->dev_private; + return dev_priv->backlight_level; }static const struct backlight_ops intel_panel_bl_ops = {Signature · 1 line
1.7.7
I'll test this patch sometime this weekend.
Alex Davis
Tested-byQuoted 15 lines
Quoted 15 lines
drivers/gpu/drm/i915/intel_panel.c +2
-1@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)static int intel_panel_get_brightness (struct backlight_device *bd) { struct drm_device *dev = bl_get_data(bd); - return intel_panel_get_backlight(dev); + struct drm_i915_private *dev_priv = dev->dev_private; + return dev_priv->backlight_level; }
Quoted 5 lines
Quoted 3 lines
drivers/gpu/drm/i915/intel_panel.c +0
-0static const struct backlight_ops intel_panel_bl_ops = {Signature · 1 line
1.7.7I'll test this patch sometime this weekend.
This patch works for me.
Quoted 5 lines · Takashi Iwai
When the brightness property is inquired while the backlight is disabled, the driver returns a wrong value (zero) because it probes the value after the backlight was turned off. This caused a black screen even after the backlight is enabled again. It should return the internal
backlight_levelinstead, so that it won't be influenced by the backlight-enable state.
Yes, this looks correct by inspection to me. I'll stick it into drm-intel-fixes.
Signature · 1 line
[email protected]
_______________________________________________
Intel-gfx mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
Quoted 22 lines · Takashi Iwai
When the brightness property is inquired while the backlight is disabled, the driver returns a wrong value (zero) because it probes the value after the backlight was turned off. This caused a black screen even after the backlight is enabled again. It should return the internal
backlight_levelinstead, so that it won't be influenced by the backlight-enable state.Tested-by Kamal Mostafa<[email protected]>Cc Alex Davis<[email protected]>Cc <[email protected]>Signed-off-by Takashi Iwai<[email protected]>--- drivers/gpu/drm/i915/intel_panel.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)drivers/gpu/drm/i915/intel_panel.c +0
-0
drivers/gpu/drm/i915/intel_panel.c static int intel_panel_update_status(struct backlight_device *bd) · line 333
Quoted 9 lines
drivers/gpu/drm/i915/intel_panel.c +2
-1@@ -326,7 +326,8 @@ static int intel_panel_update_status(struct backlight_device *bd)static int intel_panel_get_brightness (struct backlight_device *bd) {struct drm_device *dev =bl_get_data (bd); -return intel_panel_get_backlight (dev); +struct drm_i915_private *dev_priv = dev->dev_private; +return dev_priv->backlight_level; }static const struct backlight_ops intel_panel_bl_ops = {
Seems to be fixing a black-screen regression since 3.0 on EeePC devices as well...
Thanks, Woody