drm/i915: Set PWM divider to match desired frequency in vbt
authorPuthikorn Voravootivat <puthik@chromium.org>
Thu, 22 Jun 2017 19:03:37 +0000 (12:03 -0700)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Fri, 23 Jun 2017 10:24:40 +0000 (12:24 +0200)
commitc03e53b030025e9243b6e5cb717ad143f3a442ce
treebdced595c22798b6aec9bd1d10112652ed154429
parentc5e855d07834d67f30fab07e7d7316b090b8073f
drm/i915: Set PWM divider to match desired frequency in vbt

Read desired PWM frequency from panel vbt and calculate the
value for divider in DPCD address 0x724 and 0x728 to have
as many bits as possible for PWM duty cyle for granularity of
brightness adjustment while the frequency divisor is still
within 25% of the desired value.

Signed-off-by: Puthikorn Voravootivat <puthik@chromium.org>
Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Link: http://patchwork.freedesktop.org/patch/msgid/20170622190339.142671-2-puthik@chromium.org
drivers/gpu/drm/i915/intel_dp_aux_backlight.c