[Intel-gfx] [PATCH v4] drivers: i915: Default backlight PWM frequency
Olof Johansson
olof at lixom.net
Fri Nov 11 23:17:20 CET 2011
On Fri, Nov 11, 2011 at 02:12:58PM -0800, Simon Que wrote:
> If the firmware did not initialize the backlight PWM registers, set up a
> default PWM frequency of 200 Hz. This is determined using the following
> formula:
>
> freq = refclk / (128 * pwm_max)
>
> The PWM register allows the max PWM value to be set. So we want to use
> the formula, where freq = 200:
>
> pwm_max = refclk / (128 * freq)
>
> This patch will, in the case of missing PWM register initialization
> values, look for the reference clock frequency. Based on that, it sets
> an appropriate max PWM value for a frequency of 200 Hz.
>
> If no refclk frequency is found, the max PWM will be zero, which results
> in no change to the PWM registers.
>
> Signed-off-by: Simon Que <sque at chromium.org>
Acked-by: Olof Johansson <olof at lixom.net>
Looks much better. I'm OK with this solution. Matthew?
-Olof
More information about the Intel-gfx
mailing list