The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] i915: Fix bug where screen brightness is not restored
@ 2011-11-15  2:42 Alex Davis
  2011-11-15 19:58 ` Kamal Mostafa
  0 siblings, 1 reply; 5+ messages in thread
From: Alex Davis @ 2011-11-15  2:42 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, torvalds@linux-foundation.org

From: Alex Davis<alex14641@yahoo.com>

This patch fixes an issue where the screen would remain dark when

a key was pressed when the laptop lid was reopened or after the
laptop had gone into power-save mode.

It seems that there are a number of people with different machines
that have this problem:

https://bugs.launchpad.net/ubuntu/+source/linux/+bug/872652
https://launchpad.net/~kamalmostafa/+archive/stuck-backlight
and https://bugs.freedesktop.org/show_bug.cgi?id=41926

This patch is against Linux 3.1

Putting printk's in ./drivers/gpu/drm/i915/intel_panel.c showed that 
intel_get_brightness was being called after the panel was disabled,
which caused a 0 to be saved as the value to restore the brightness. 
intel_panel_disable_backlight merely sets the brightness to 0. Commenting
out this call allows the correct brightness value to be saved.

Signed-off-by: Alex Davis <alex14641@yahoo.com>
Tested-by: Kamal Mostafa <kamal@canonical.com>
-----
diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index a9e0c7b..6f56676 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -262,8 +262,6 @@ void intel_panel_disable_backlight(struct drm_device *dev)
                dev_priv->backlight_level = intel_panel_get_backlight(dev);
                dev_priv->backlight_enabled = false;
        }
-
-       intel_panel_set_backlight(dev, 0);
 }

 void intel_panel_enable_backlight(struct drm_device *dev)

 

I code, therefore I am

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-11-16  8:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-11-15  2:42 [PATCH] i915: Fix bug where screen brightness is not restored Alex Davis
2011-11-15 19:58 ` Kamal Mostafa
2011-11-15 20:28   ` [Intel-gfx] " Takashi Iwai
2011-11-15 21:54     ` Kamal Mostafa
2011-11-16  8:01       ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox