* Can video_detect be made __init?
@ 2008-11-08 13:55 Andrey Borzenkov
2008-11-09 12:20 ` Thomas Renninger
2008-11-12 23:34 ` Thomas Renninger
0 siblings, 2 replies; 3+ messages in thread
From: Andrey Borzenkov @ 2008-11-08 13:55 UTC (permalink / raw)
To: Thomas Renninger; +Cc: linux-acpi
[-- Attachment #1: Type: text/plain, Size: 497 bytes --]
I would add DMI entries to force vendor backlight for my system, but
I'd really prefer they are not remain in memory forever. Is there any
reason for the whole detection to not happen exactly once? After all,
ACPI cannot change after boot, can it?
Hmm ... actually DSDT can be loaded from initrd, so it can change ... but
in this case we actually are just interested in DMI matching which says
whether vendor driver is preferred or not. What would be the the best
place to call it from?
-andrey
[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 197 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Can video_detect be made __init?
2008-11-08 13:55 Can video_detect be made __init? Andrey Borzenkov
@ 2008-11-09 12:20 ` Thomas Renninger
2008-11-12 23:34 ` Thomas Renninger
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Renninger @ 2008-11-09 12:20 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: linux-acpi, preining
Hi,
First, thanks Len for adjusing the patches and taking them into your test
tree.
Norbert: I tried your .config you sent recently and it compiles fine with
Len's ACPI test tree which now includes the patchset.
On Saturday 08 November 2008 02:55:07 pm Andrey Borzenkov wrote:
> I would add DMI entries to force vendor backlight for my system,
Why? video.ko is the way to go. Do you see regressions with that?
> but I'd really prefer they are not remain in memory forever.
You mean video.ko should give up access to the backlight interface and
e.g. toshiba.ko takes over at runtime?
Theoretically that may be possible, but practically this should not be
implemented.
You must make sure all brightness functions got processed and unregister the
backlight interface in video.ko, before you could re-register with a vendor
specific driver. Rather complex without much gain.
> Is there any
> reason for the whole detection to not happen exactly once? After all,
> ACPI cannot change after boot, can it?
It should only happen once:
acpi_video_backlight_support()
and
acpi_video_display_switch_support()
the funcs called from the brightness supporting drivers checks for:
if (!acpi_video_caps_checked)
acpi_video_get_capabilities(NULL);
which should do the real checking only once.
If you see that checking is done several times, it's a bug.
>
> Hmm ... actually DSDT can be loaded from initrd, so it can change ...
Checking is done after the DSDT got chosen, even if provided via initrd.
DSDT overriding is done far before entering userspace when the real
initrd tasks are processed (in userspace) and also far before video_detect.c
gets active. That also is the reason why the DSDT override patch is not
mainline, because it uses the initrd in a way it should not.
> in this case we actually are just interested in DMI matching which says
> whether vendor driver is preferred or not. What would be the the best
> place to call it from?
I do not understand this. Why are you only interested in dmi checking if
you override the DSDT?
DSDT overriding is for debugging only. Let's say you debug brightness
functionality, then you pass the boot param to either choose vendor.ko or
acpi_xy.ko brightness. Then you change DSDT again, you have to reboot anyway
and adjust the boot param again.
The dmi blacklist should stay empty in mainline as long as we find really
broken _BCM, _BQC implementations.
Thanks (that I am not the only one looking at this),
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: Can video_detect be made __init?
2008-11-08 13:55 Can video_detect be made __init? Andrey Borzenkov
2008-11-09 12:20 ` Thomas Renninger
@ 2008-11-12 23:34 ` Thomas Renninger
1 sibling, 0 replies; 3+ messages in thread
From: Thomas Renninger @ 2008-11-12 23:34 UTC (permalink / raw)
To: Andrey Borzenkov; +Cc: linux-acpi
On Saturday 08 November 2008 07:55:07 am Andrey Borzenkov wrote:
> I would add DMI entries to force vendor backlight for my system, but
> I'd really prefer they are not remain in memory forever. Is there any
> reason for the whole detection to not happen exactly once? After all,
> ACPI cannot change after boot, can it?
>
> Hmm ... actually DSDT can be loaded from initrd, so it can change ... but
> in this case we actually are just interested in DMI matching which says
> whether vendor driver is preferred or not. What would be the the best
> place to call it from?
Sorry, I only half answered the question in my previous mail.
acpi_video_backlight_support(..)
which is called by the backlight supporting drivers is going to check (when
invoked the first time) whether general ACPI video functions are provided via
the ACPI tables.
Advantage is that the check is only done if video.ko or vendor_laptop drivers
are trying to be loaded. That means on a server where video.ko or
vendor_laptop.ko are not needed, the video ACPI func detection does not take
place.
The "disadvantage" is that it's done at driver load time and cannot be
declared __init.
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-11-12 23:34 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-11-08 13:55 Can video_detect be made __init? Andrey Borzenkov
2008-11-09 12:20 ` Thomas Renninger
2008-11-12 23:34 ` Thomas Renninger
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox