From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Andrew Morton <akpm@linux-foundation.org>,
linux-acpi@vger.kernel.org, "Rafael J. Wysocki" <rjw@sisk.pl>
Subject: Re: brightness control on thinkpad t61p
Date: Sun, 6 Jan 2008 23:36:23 -0200 [thread overview]
Message-ID: <20080107013623.GA6667@khazad-dum.debian.net> (raw)
In-Reply-To: <20071227123358.GB25535@khazad-dum.debian.net>
On Thu, 27 Dec 2007, Henrique de Moraes Holschuh wrote:
> On Wed, 26 Dec 2007, Matthew Garrett wrote:
> > On Wed, Dec 26, 2007 at 02:10:27PM -0800, Andrew Morton wrote:
> >
> > > Vice versa for me. The thinkpad_acpi driver in 2.6.23 _does_ work,
> > > but its interface vanished in 2.6.24-rc5 and the acpi driver does not
> > > work.
> >
> > As I said, the interface for the ACPI backlight driver is confusing. 10
> > will only work if the firmware supports it - have you tried other
> > values?
>
> Not on a thinkpad. The AML code is not that stupid, it rounds down to the
> nearest supported value. It takes a brightness percentage (0 to 100), maps
> it through a table to get the visual brightness -> hardware brightness curve
> right (it is non-linear), then does what thinkpad-acpi does to set backlight
> brightness.
Bah, I spoke too soon. Latest round of BIOSes seems to have broken this,
either that or I completely misunderstood the older AML code.
Rounding to the nearest supplied _BCL value before we call _BCM apparently
will be needed on thinkpads as well.
Oh, just another datapoint for Andrew: your thinkpad backlight firmware
behaves differently before and after something calls _BCL. And I believe it
also behaves differently before Linux boots (my guess is that it changes
behaviour when ACPI inits), so it is getting more and more complicated to
debug this thing without direct access to one such thinkpad.
I heavily recommend calling the ACPI _BCL method (e.g. by loading ACPI video
and unloading it later if you don't want it), so that at least you have a
small chance of things working consistently :) The AML code is supposed to
just issue normal ACPI events and leave the backlight hardware alone after
you call _BCL.
But if X.org is messing with the BIOS scratch registers, not even ACPI
video.c will work, as the SMBIOS crap the thinkpad AML code calls to
implement BQC/BCQ and BCM will be disabled. In that case, X.org has to be
able to modify the hardware directly (through xbacklight) in order to get
anything done.
I am seriously considering a call to _BCM in thinkpad-acpi, to make sure we
get a more-or-less sane thinkpad behaviour on these newer Lenovo BIOSes,
even if the user doesn't want to use ACPI video.c for some reason.
--
"One disk to rule them all, One disk to find them. One disk to bring
them all and in the darkness grind them. In the Land of Redmond
where the shadows lie." -- The Silicon Valley Tarot
Henrique Holschuh
next prev parent reply other threads:[~2008-01-07 1:36 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-12-23 8:00 brightness control on thinkpad t61p Andrew Morton
2007-12-23 12:16 ` Rafael J. Wysocki
2007-12-24 7:34 ` Matthew Garrett
2007-12-24 17:14 ` Henrique de Moraes Holschuh
2007-12-26 22:10 ` Andrew Morton
2007-12-26 22:23 ` Matthew Garrett
2007-12-27 12:33 ` Henrique de Moraes Holschuh
2008-01-07 1:36 ` Henrique de Moraes Holschuh [this message]
2008-01-07 19:48 ` Matthew Garrett
2008-01-08 0:32 ` Henrique de Moraes Holschuh
2008-01-08 0:45 ` Matthew Garrett
2008-01-08 12:06 ` Henrique de Moraes Holschuh
2008-01-08 12:18 ` Matthew Garrett
2008-01-08 12:48 ` Henrique de Moraes Holschuh
2008-01-08 15:17 ` Matthew Garrett
2008-01-08 15:45 ` Richard Purdie
2008-01-08 15:54 ` Matthew Garrett
2008-01-08 16:29 ` Richard Purdie
2008-01-08 16:49 ` Henrique de Moraes Holschuh
2008-01-08 16:56 ` Richard Purdie
2008-01-08 17:36 ` Henrique de Moraes Holschuh
2007-12-27 12:31 ` Henrique de Moraes Holschuh
2007-12-24 17:08 ` Henrique de Moraes Holschuh
2007-12-26 22:10 ` Andrew Morton
2007-12-27 13:15 ` Henrique de Moraes Holschuh
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=20080107013623.GA6667@khazad-dum.debian.net \
--to=hmh@hmh.eng.br \
--cc=akpm@linux-foundation.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.org \
--cc=rjw@sisk.pl \
/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