From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Olof Johansson <olof@lixom.net>
Cc: intel-gfx@lists.freedesktop.org, olofj@chromium.org,
Simon Que <sque@chromium.org>,
snanda@chromium.org
Subject: Re: [PATCH v4] drivers: i915: Default backlight PWM frequency
Date: Fri, 11 Nov 2011 22:30:56 +0000 [thread overview]
Message-ID: <20111111223056.GA21537@srcf.ucam.org> (raw)
In-Reply-To: <20111111221720.GA30923@quad.lixom.net>
On Fri, Nov 11, 2011 at 02:17:20PM -0800, Olof Johansson wrote:
> 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?
I'd still prefer this to come from the firmware in some way, but in the
absence of the awesome let's go with the good.
Acked-by: Matthew Garrett <mjg@redhat.com>
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2011-11-11 23:15 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
2011-11-11 22:30 ` Matthew Garrett [this message]
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=20111111223056.GA21537@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=intel-gfx@lists.freedesktop.org \
--cc=olof@lixom.net \
--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