From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Thomas Renninger <trenn@suse.de>
Cc: ak@linux.intel.com, linux-acpi@vger.kernel.org,
Henrique de Moraes Holschuh <hmh@hmh.eng.br>,
Carlos Corbacho <carlos@strangeworlds.co.uk>,
Jonathan Woithe <jwoithe@physics.adelaide.edu.au>,
malattia@linux.it, stelian@popies.net,
linux-next@vger.kernel.org,
Corentin CHARY <corentincj@iksaif.net>,
Lennart Poettering <mzxreary@0pointer.de>,
Julia Jomantaite <julia.jomantaite@gmail.com>,
corsac@debian.org, dannybaumann@web.de, marcus@better.se,
Zhang Rui <rui.zhang@intel.com>, Hong Liu <hong.liu@intel.com>
Subject: Re: [PATCH 2/2] ACPI Check for backlight support via ACPI video.ko otherwise use vendor ACPI drivers
Date: Wed, 9 Jul 2008 15:57:58 +0100 [thread overview]
Message-ID: <20080709145758.GA22147@srcf.ucam.org> (raw)
In-Reply-To: <200807091649.52605.trenn@suse.de>
On Wed, Jul 09, 2008 at 04:49:49PM +0200, Thomas Renninger wrote:
> On Thursday 03 July 2008 18:21:52 Matthew Garrett wrote:
> > On Thu, Jul 03, 2008 at 06:08:59PM +0200, Thomas Renninger wrote:
> > > + if (ACPI_SUCCESS(acpi_get_handle(device->handle, "DRDY", &h_dummy))) {
> > > + ACPI_DEBUG_PRINT((ACPI_DB_INFO, "Found IGD device\n"));
> > > + video_caps |= ACPI_VIDEO_IGD;
> > > + }
> >
> > In principle, it's possible for a vendor to implement opregion but not
> > actually use it until the tche flags are set. If anyone's done that then
> > you've just broken backlight control on their system.
>
> Who should set that flags?
> The dri driver is going to set that if he can serve IGD parts, right?
No. The opregion spec requires you to use video.ko.
> Currently this patch makes the vendor specific e.g. thinkpad_acpi to serve
> backlight brightness switching if a IGD device is found. Because currently
> there is no IGD support in the kernel.
Yes, but that's *wrong*. There are many machines that support opregion
but do not require its use - they'll behave using the old ACPI mechanism
until you switch them to the new mode. Except right now if you switch
them to the new mode then they'll stop working, because the DRI code
isn't merged yet.
> You should export a function intel_opregion_init()? so that built in kernel
> parts can check for IGD backlight support, instead of the lines above (part
> of my patch). If this succeeds, my patch will tell vendor specfic drivers to
> keep fingers off backlight switching.
No. Please read the opregion spec. The way it works is as follows:
1) Firmware exports an ACPI video class
2) OS checks whether the hardware supports the opregion ACPI video
handling (this is done by looking at tables in a region of memory
pointed at by a PCI configuration register)
3) OS sets opregion flags
4) OS calls the ACPI backlight set function
5) Firmware writes desired brightness to an opregion mailbox and
triggers an interrupt
6) OS sets the brightness
For this to work, the ACPI video driver needs to work as it currently
does. It is not correct for it to disable itself on IGD systems.
--
Matthew Garrett | mjg59@srcf.ucam.org
next prev parent reply other threads:[~2008-07-09 14:57 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-03 16:08 [PATCH 2/2] ACPI Check for backlight support via ACPI video.ko otherwise use vendor ACPI drivers Thomas Renninger
2008-07-03 16:21 ` Matthew Garrett
2008-07-03 22:29 ` Matthew Garrett
2008-07-09 14:49 ` Thomas Renninger
2008-07-09 14:57 ` Matthew Garrett [this message]
2008-07-09 16:00 ` Thomas Renninger
2008-07-10 10:07 ` Matthew Garrett
2008-07-10 11:00 ` Thomas Renninger
2008-07-10 11:09 ` Matthew Garrett
2008-07-10 11:15 ` Thomas Renninger
2008-07-10 11:19 ` Matthew Garrett
2008-07-10 11:36 ` Thomas Renninger
2008-07-10 11:53 ` Matthew Garrett
2008-07-10 12:19 ` Thomas Renninger
2008-07-10 12:24 ` Matthew Garrett
2008-07-10 12:48 ` Thomas Renninger
2008-07-10 12:58 ` Matthew Garrett
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=20080709145758.GA22147@srcf.ucam.org \
--to=mjg59@srcf.ucam.org \
--cc=ak@linux.intel.com \
--cc=carlos@strangeworlds.co.uk \
--cc=corentincj@iksaif.net \
--cc=corsac@debian.org \
--cc=dannybaumann@web.de \
--cc=hmh@hmh.eng.br \
--cc=hong.liu@intel.com \
--cc=julia.jomantaite@gmail.com \
--cc=jwoithe@physics.adelaide.edu.au \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-next@vger.kernel.org \
--cc=malattia@linux.it \
--cc=marcus@better.se \
--cc=mzxreary@0pointer.de \
--cc=rui.zhang@intel.com \
--cc=stelian@popies.net \
--cc=trenn@suse.de \
/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;
as well as URLs for NNTP newsgroup(s).