From: Peter Clifton <pcjc2@cam.ac.uk>
To: linux-acpi@vger.kernel.org
Subject: _DOS in video.c
Date: Fri, 05 Oct 2007 22:50:06 +0100 [thread overview]
Message-ID: <1191621006.23575.9.camel@localhost> (raw)
Hi,
I've been investigating some backlight vs. lidswitch problems with my HP
Compaq nc6432 laptop, and have been digging in video.c
At start of the video driver, the _DOS method is executed, and similarly
when the driver is unloaded.
(From the Ubuntu Gutsy kernel.. hopefully this isn't disto-patched)
1706 static int acpi_video_bus_start_devices(struct acpi_video_bus
*video)
1707 {
1708 return acpi_video_bus_DOS(video, 1, 0);
1709 }
1710
1711 static int acpi_video_bus_stop_devices(struct acpi_video_bus
*video)
1712 {
1713 return acpi_video_bus_DOS(video, 0, 1);
1714 }
It seems to me - as I understand the driver, is that we want to tell the
BIOS specifically NOT to process AC brightness changes, or display
switches (which on my laptop appears to effect LID switch backlight
blanking too).
It seems that the video.c driver has this reversed, and actually lets
the BIOS keep doing these things after video.ko is loaded. Similarly,
when unloading video.ko, my laptop stops switching the backlight on/off
for lid events.
I've reversed the sense of the acpi_video_bus_DOS() calls for my own
testing, and it seems to be ok. There is unfortunately DSDT brokenness
which means it still doesn't work satisfactorily, but I'm debugging that
with a DSDT override now. I get lid notifications, but there is a delay
before /proc/acpi/button/lid/*/state "catches up" - which breaks
userspace that checks this state when it sees an event.
It very much looks like this delay is due to various sleep statements in
the DSDT when not internally handling the backlight etc.. There are also
a lot of OS specific paths in the DSDT for this code, making things even
more fun to trace.
Kind Regards,
--
Peter Clifton
Electrical Engineering Division,
Engineering Department,
University of Cambridge,
9, JJ Thomson Avenue,
Cambridge
CB3 0FA
Tel: +44 (0)7729 980173 - (No signal in the lab!)
next reply other threads:[~2007-10-05 22:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-10-05 21:50 Peter Clifton [this message]
2007-10-08 8:43 ` _DOS in video.c Zhang Rui
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=1191621006.23575.9.camel@localhost \
--to=pcjc2@cam.ac.uk \
--cc=linux-acpi@vger.kernel.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).