summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/udl
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2013-08-23 10:50:39 +0300
committerDaniel Vetter <daniel.vetter@ffwll.ch>2013-09-06 09:41:20 +0200
commitcac6a5ae0118832936eb162ec4cedb30f2422bcc (patch)
tree955fb8f6d48b87d840925458bd24c71f39259efa /drivers/gpu/drm/udl
parent1c5fd08520de35c7ac0d70e2ed3c3bb200830447 (diff)
downloadblackbird-obmc-linux-cac6a5ae0118832936eb162ec4cedb30f2422bcc.tar.gz
blackbird-obmc-linux-cac6a5ae0118832936eb162ec4cedb30f2422bcc.zip
drm/i915: try not to lose backlight CBLV precision
ACPI has _BCM and _BQC methods to set and query the backlight brightness, respectively. The ACPI opregion has variables BCLP and CBLV to hold the requested and current backlight brightness, respectively. The BCLP variable has range 0..255 while the others have range 0..100. This means the _BCM method has to scale the brightness for BCLP, and the gfx driver has to scale the requested value back for CBLV. If the _BQC method uses the CBLV variable (apparently some implementations do, some don't) for current backlight level reporting, there's room for rounding errors. Use DIV_ROUND_UP for scaling back to CBLV to get back to the same values that were passed to _BCM, presuming the _BCM simply uses bclp = (in * 255) / 100 for scaling to BCLP. Reference: https://gist.github.com/aaronlu/6314920 Reported-by: Aaron Lu <aaron.lu@intel.com> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Reviewed-by: Aaron Lu <aaron.lu@intel.com> Cc: stable@vger.kernel.org Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/udl')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud