]> git.kernelconcepts.de Git - karo-tx-linux.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)
commitca88479c1c3b7b1a9f94320745f5331e1de77f80
tree1704b84389d53be5441a805eb8e5b3ef5346f1be
parent1a2eb4604b85c5efb343da8a4dcf41288fcfca85
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