]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: initialize backlight max from VBT
authorJani Nikula <jani.nikula@intel.com>
Fri, 4 Sep 2015 13:55:14 +0000 (16:55 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 7 Sep 2015 16:29:01 +0000 (18:29 +0200)
commit07476c88afe65f48fd210bc186b61bc24302995f
tree5dfaf5544a7343b43547b65062eb135e3ebb23dd
parent09ebaeb80b21b3d292d7642b7d49e1eb59c989d5
drm/i915: initialize backlight max from VBT

Normally we determine the backlight PWM modulation frequency (which we
also use as backlight max value) from the backlight registers at module
load time, expecting the registers have been initialized by the BIOS. If
this is not the case, we fail.

The VBT contains the backlight modulation frequency in Hz. Add platform
specific functions to convert the frequency in Hz to backlight PWM
modulation frequency, and use them to initialize the backlight when the
registers are not initialized by the BIOS.

v2: Fix SPT and VLV. Thanks to Clint for the VLV code.

Cc: Clint Taylor <clinton.a.taylor@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Reviewed-by: Clint Taylor <Clinton.A.Taylor@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/i915_reg.h
drivers/gpu/drm/i915/intel_panel.c