From: Thomas Renninger <trenn@suse.de>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Matthew Garrett <mjg59@srcf.ucam.org>,
Len Brown <lenb@kernel.org>,
ibm-acpi-devel@lists.sourceforge.net, linux-acpi@vger.kernel.org
Subject: How to distinguish between general ACPI video driver module and brightness/display providing vendor specific ACPI modules
Date: Tue, 09 Oct 2007 22:53:25 +0200 [thread overview]
Message-ID: <1191963205.3880.58.camel@fanta4.site> (raw)
In-Reply-To: <20071009142934.GB444@khazad-dum.debian.net>
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.
Have I overseen something? Does this make sense?
And now the problem:
Vendor specific drivers might better know whether a machine should get
blacklisted and still should be served by the vendor specific module,
again I'd split up brightness and display/video switching functionality.
Blacklisting might be done by module param to find out machines not
working with the general video module without hurting anyone and for
easy testing and more important, automatically via dmi/DSDT or whatever
blacklisting info. *But* the general video driver will just start
working on these functions if loaded first.
I have no nice idea how to solve that.
The only thing that comes to my mind is to enforce somehow that vendor
specific modules are loaded first and then set something like
disable_video_brightness/disable_video_display global ACPI variables
which the general video driver evaluates when it's loaded afterwards and
in turn doesn't touch these functions even if available.
Not sure whether it can be enforced via udev (in kernel by sending the
uevent for LNXVIDEO as the last one, or by even more ugly userspace
rules...).
Maybe the suggestions after "And now the problem" are a bit overdosed
and the part "What about" is enough and we drive well with such an
approach? -> Just let video serve it's functions which it is designed
for and add fixes/workarounds there if they pop up, no need for vendor
specific workarounds, unfortunately also not possible, at least they
must be located in the video driver itself then.
Thomas
next prev parent reply other threads:[~2007-10-09 20:53 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
[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 ` Thomas Renninger [this message]
2007-10-10 11:44 ` [ibm-acpi-devel] How to distinguish between general ACPI video driver module and brightness/display providing vendor specific ACPI modules Thomas Renninger
2007-10-10 20:46 ` 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
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
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=1191963205.3880.58.camel@fanta4.site \
--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 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).