drm/i915: fix opregion backlight chip detect and range
authorLi Peng <peng.li@linux.intel.com>
Tue, 15 Sep 2009 05:03:36 +0000 (13:03 +0800)
committerJesse Barnes <jbarnes@virtuousgeek.org>
Thu, 17 Sep 2009 21:32:08 +0000 (14:32 -0700)
commit078a033f45471c44befd72ccacf3f31d75299dba
treedc5b9c868684b28040fdafaeeef57cb6489feb8e
parent8dd81a381e8886129c0923f1fe22ff5ca36ae8da
drm/i915: fix opregion backlight chip detect and range

BLC_PWM_CTL2 is for 965+ only, so add device model check for
legacy backlight control.

For native backlight control, it maps the backlight value (0~255)
in opregion ASLE[BCLP] to backlight duty cycle (0~max_backlight)
and set into control register.

It also add support for IGD device, which follows opregion spec.

Signed-off-by: Li Peng <peng.li@intel.com>
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
drivers/gpu/drm/i915/i915_opregion.c