public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: Simon Que <sque@chromium.org>
Cc: intel-gfx@lists.freedesktop.org, olofj@chromium.org, snanda@chromium.org
Subject: Re: [PATCH v4] drivers: i915: Default backlight PWM frequency
Date: Fri, 11 Nov 2011 14:17:20 -0800	[thread overview]
Message-ID: <20111111221720.GA30923@quad.lixom.net> (raw)
In-Reply-To: <1321049578-26742-1-git-send-email-sque@chromium.org>

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@chromium.org>

Acked-by: Olof Johansson <olof@lixom.net>

Looks much better. I'm OK with this solution. Matthew?


-Olof

  reply	other threads:[~2011-11-11 22:17 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-11 22:12 [PATCH v4] drivers: i915: Default backlight PWM frequency Simon Que
2011-11-11 22:17 ` Olof Johansson [this message]
2011-11-11 22:30   ` Matthew Garrett
2011-11-15 18:47 ` Takashi Iwai
2012-01-17 10:34   ` Daniel Vetter

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20111111221720.GA30923@quad.lixom.net \
    --to=olof@lixom.net \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=olofj@chromium.org \
    --cc=snanda@chromium.org \
    --cc=sque@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox