From: Thomas Renninger <trenn@suse.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
ibm-acpi-devel@lists.sourceforge.net, linux-acpi@vger.kernel.org,
Len Brown <lenb@kernel.org>
Subject: Re: [ibm-acpi-devel] How to distinguish between general ACPI video driver module and brightness/display providing vendor specific ACPI modules
Date: Wed, 10 Oct 2007 13:44:17 +0200 [thread overview]
Message-ID: <1192016657.9847.319.camel@queen.suse.de> (raw)
In-Reply-To: <1191963205.3880.58.camel@fanta4.site>
On Tue, 2007-10-09 at 22:53 +0200, Thomas Renninger wrote:
> On Tue, 2007-10-09 at 11:29 -0300, Henrique de Moraes Holschuh wrote:
> > On Tue, 09 Oct 2007, Thomas Renninger wrote:
> > > On Tue, 2007-10-09 at 10:47 -0300, Henrique de Moraes Holschuh wrote:
> > > > On Tue, 09 Oct 2007, Thomas Renninger wrote:
> > > > > No, all the _BCL poking should vanish.
> > > >
> > > > I need to *somehow* find out if the thinkpad supports the video extensions.
> > >
> > > Maybe in scan.c:acpi_video_bus_match() we could add a quirk like:
> > >
> > > if (ThinkPad){
> > > if (ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCM", &h_dummy1)) &&
> > > ACPI_SUCCESS(acpi_get_handle(device->handle, "_BCL", &h_dummy2))) &&
> > > return 0;
> > > else
> > > return -ENODEV;
> > >
> > > This would make the video module only load on thinkpads if the
> > > brightness functions are implemented.
> >
> > The video module handles a lot more than just backlight. I am not going to
> > make thinkpad-acpi disable the video module in any way.
> >
> > Output switching is another area where thinkpad-acpi and video duplicate
> > functionality, and frankly, I have no idea which ones works, and how well,
> > and in which thinkpads.
> Me too...
> So we have the thinkpad_acpi and other vendor specific drivers and the
> general video module, for the latter we want to go for (but was/is
> rather untested compared to the others).
>
> What about:
> We could compile in a global bit field that gets filled in
> video_bus_match in scan.c whether all required brightness functions are
> available and another bit reserved for whether all needed video/display
> functions are available. This can be done at early ACPI parse time
> before any module got loaded.
> ThinkPad and other vendor specific modules could then not touch video or
> brightness by checking this global bit field.
> Video serves brightness and/or display switching if required functions
> are available by default the others take their hands off then.
Unfortunately, I don't have much time (at least the next days) to help
here much.
IMO this should work. Like that there is no need in Thinkpad to fiddle
with hardcoded "\\_SB.../_BCL" paths to find out whether brightness is
supported. Just check for a global variable video_funcs_supported ->
take hands off display switching and brightness_funcs_supported -> take
hands off brightness control. This should work out fine for other vendor
specific drivers also.
FYI:
1)
If I read the thinkpad code right, it always relies on that brightness
level can be read through EC at address 0x31?
I have a T60 here where this does not work, I can switch (only in
console) the brightness levels and there is no change in at any ec
address. So this really must use _BCM,_BCL?
2)
I also found in my X logs on a T60:
(WW) NVIDIA(0): Error: Unable to find DOS (Enable/Disable output switching)
(WW) NVIDIA(0): file path under /proc/acpi/video. NVIDIA X driver will not
(WW) NVIDIA(0): be able to respond to display change hotkey events.
Intel graphics drivers and possibly others probably also want to make
use of this.
So I think switching to video driver here (thinkpad must not touch this
then anymore I expect) makes a lot of sense. I wonder how many
people/tools made use of /proc/acpi/ibm/video?
3)
I think I found a bug in thinkpad_acpi:
if (!*ibm->acpi->handle)
return 0;
in setup_acpi_notify(..) probably should be:
if (!ibm->acpi->handle)
return 0;
Thomas
next prev parent reply other threads:[~2007-10-10 11:44 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-08 13:12 [GIT PATCH v2] thinkpad-acpi changes for the merge window (part 2) Henrique de Moraes Holschuh
2007-10-08 13:12 ` [PATCH 2/4] ACPI: thinkpad-acpi: support 16 levels of brightness (v2) Henrique de Moraes Holschuh
2007-10-09 5:16 ` [ibm-acpi-devel] " Thomas Renninger
[not found] ` <1191907013.9847.69.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
2007-10-09 11:45 ` Henrique de Moraes Holschuh
[not found] ` <1191849179-24087-1-git-send-email-hmh-N3TV7GIv+o9fyO9Q7EP/yw@public.gmane.org>
2007-10-08 13:12 ` [PATCH 1/4] ACPI: thinkpad-acpi: skip blanks before the data when parsing sysfs Henrique de Moraes Holschuh
2007-10-08 13:12 ` [PATCH 3/4] ACPI: thinkpad-acpi: disable backlight handler if ACPI generic could do it Henrique de Moraes Holschuh
2007-10-09 6:21 ` Thomas Renninger
[not found] ` <1191910875.9847.79.camel-X8wR35IVlAxolqkO4TVVkw@public.gmane.org>
2007-10-09 7:59 ` Matthew Garrett
2007-10-09 8:25 ` Thomas Renninger
2007-10-09 8:33 ` Matthew Garrett
2007-10-09 9:46 ` Thomas Renninger
2007-10-09 10:04 ` Matthew Garrett
2007-10-09 11:14 ` Henrique de Moraes Holschuh
2007-10-09 13:29 ` Thomas Renninger
2007-10-09 13:34 ` Matthew Garrett
2007-10-09 13:47 ` Thomas Renninger
2007-10-09 13:49 ` Matthew Garrett
2007-10-09 13:47 ` Henrique de Moraes Holschuh
2007-10-09 14:11 ` Thomas Renninger
2007-10-09 14:29 ` Henrique de Moraes Holschuh
2007-10-09 20:53 ` How to distinguish between general ACPI video driver module and brightness/display providing vendor specific ACPI modules Thomas Renninger
2007-10-10 11:44 ` Thomas Renninger [this message]
2007-10-10 20:46 ` [ibm-acpi-devel] " Henrique de Moraes Holschuh
2007-10-10 21:23 ` Henrique de Moraes Holschuh
2007-10-08 13:12 ` [PATCH 4/4] ACPI: thinkpad-acpi: bump up version to 0.17 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=1192016657.9847.319.camel@queen.suse.de \
--to=trenn@suse.de \
--cc=hmh@hmh.eng.br \
--cc=ibm-acpi-devel@lists.sourceforge.net \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=mjg59@srcf.ucam.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.