drm/i915: keep max backlight internal to intel_panel.c
authorJani Nikula <jani.nikula@intel.com>
Fri, 12 Apr 2013 12:18:36 +0000 (15:18 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 25 Apr 2013 12:07:07 +0000 (14:07 +0200)
commitd65406327345e5a5e0f697a3ffe3e53bc9b5d7c6
tree767bdbce5e87fa69e7a8c92df814c94249e8717c
parent2a7aceecf15a463ba6bfa83b6579e75bb4703cd9
drm/i915: keep max backlight internal to intel_panel.c

In preparation of adding locking to backlight, make max backlight value
(the modulation frequency the PWM duty cycle value must not exceed)
internal to intel_panel.c.

Have intel_panel_set_backlight() accept a caller defined range for level,
and scale input to max backlight value internally.

Clean up intel_panel_get_max_backlight() and usage internally.

Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_drv.h
drivers/gpu/drm/i915/intel_opregion.c
drivers/gpu/drm/i915/intel_panel.c