]> www.infradead.org Git - users/jedix/linux-maple.git/commit
drm/i915/panel: Always record the backlight level again (but cleverly)
authorTakashi Iwai <tiwai@suse.de>
Fri, 14 Oct 2011 09:45:40 +0000 (11:45 +0200)
committerMaxim Uvarov <maxim.uvarov@oracle.com>
Thu, 8 Dec 2011 19:17:44 +0000 (11:17 -0800)
commitcc67042d182f75e7eb173c42527a5686e435b1d0
tree7054e22fcb9dbab823467ec0d3d24d7b579ceaa4
parentecd5ceef3bd8bb92eda9fbc6b262300de7e185e1
drm/i915/panel: Always record the backlight level again (but cleverly)

commit f52c619a590fa75276c07dfcaf380dee53e4ea4c upstream.

The commit 47356eb67285014527a5ab87543ba1fae3d1e10a introduced a
mechanism to record the backlight level only at disabling time, but it
also introduced a regression.  Since intel_lvds_enable() may be called
without disabling (e.g. intel_lvds_commit() calls it unconditionally),
the backlight gets back to the last recorded value.  For example, this
happens when you dim the backlight, close the lid and open the lid,
then the backlight suddenly goes to the brightest.

This patch fixes the bug by recording the backlight level always
when changed via intel_panel_set_backlight().  And,
intel_panel_{enable|disable}_backlight() call the internal function not
to update the recorded level wrongly.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/gpu/drm/i915/intel_panel.c