]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Treat pre-gen4 backlight duty cycle value consistently
authorKeith Packard <keithp@keithp.com>
Fri, 18 Nov 2011 19:09:24 +0000 (11:09 -0800)
committerKeith Packard <keithp@keithp.com>
Wed, 23 Nov 2011 21:07:13 +0000 (13:07 -0800)
commitc8dff62dae0d4d9ac67de25f3037cc823770a447
tree1704b84389d53be5441a805eb8e5b3ef5346f1be
parente9c57667aa8477b39eff14a12691af96550f3d7e
drm/i915: Treat pre-gen4 backlight duty cycle value consistently

For i945 and earlier chips, the backlight frequency value had the low
bit (of 16) fixed to zero. The Pineview code path handled this by just
exposing the backlight range as 15 bits while other chips had the
backlight range limited to 0 .. 0xfffe.

This patch makes everyone take the pineview code path, providing 15
bits of backlight duty cycle range which seems more than sufficient to
me.

Daniel Mack reported that writing 1 to bit 0 of the duty cycle
register was causing problems on his Samsung X20 notebook, even when
the duty cycle value was less than the maximum backlight value. (He
tried a value of 29749 with max_brightness of 29750). This patch never
writes a '1' to that bit.

Signed-off-by: Keith Packard <keithp@keithp.com>
Reviewed-by: Takashi Iwai <tiwai@suse.de>
Reported-and-tested-by: Daniel Mack <zonque@gmail.com>
Cc: stable@kernel.org
drivers/gpu/drm/i915/intel_panel.c