Dell acpi_video patch

Juergen Lock <[email protected]>
Newsgroups gmane.os.freebsd.devel.mobile
Message-ID <20121005215316.GA38707__32405.4545526907$1349474172$gmane$org@triton8.kn-bremen.de>
Hi!

 I finally took a closer look why acpi_video found nothing on my
Dell laptop (Precision M4500), and came up with this patch:

--- sys/dev/acpica/acpi_video.c.orig
+++ sys/dev/acpica/acpi_video.c
@@ -906,7 +906,7 @@ vid_enum_outputs_subr(ACPI_HANDLE handle
 
 	for (i = 0; i < argset->dod_pkg->Package.Count; i++) {
 		if (acpi_PkgInt32(argset->dod_pkg, i, &val) == 0 &&
-		    (val & DOD_DEVID_MASK_FULL) == adr) {
+		    (val & (DOD_DEVID_MASK_FULL | 0x80000000)) == adr) {
 			argset->callback(handle, val, argset->context);
 			argset->count++;
 		}

which gives me:

% sysctl hw.acpi.video.
hw.acpi.video.crt0.active: 0
hw.acpi.video.lcd0.active: 0
hw.acpi.video.lcd0.brightness: 100
hw.acpi.video.lcd0.fullpower: 100
hw.acpi.video.lcd0.economy: 46
hw.acpi.video.lcd0.levels: 100 46 0 6 13 20 26 33 40 46 53 60 66 73 80 86 93 100
hw.acpi.video.ext0.active: 0
hw.acpi.video.ext1.active: 0
hw.acpi.video.ext2.active: 0
hw.acpi.video.ext3.active: 0
% 

and I can change the lcd brightness.  hw.acpi.video.lcd0.active is
still 0 tho and can't be changed regardless if the display is off
or on - maybe that also explains the blank screen after suspend/resume
w/o X running or when exiting X or switching from X to a textconsole?

 I also took a cursory look at Linux' drivers/platform/x86/dell-laptop.c
and drivers/platform/x86/dell-wmi.c and found Linux seems to do smi
calls, tho it wasn't immediately obvious if that affects all Dell
laptops or only older models.  (The blank screen problem doesn't occur
on Linux.)

 See also my FLCL entry:

	https://laptop.bsdgroup.de/freebsd/index.html?action=show_laptop_detail&laptop=13061

 Thanx! :)
	Juergen
_______________________________________________
[email protected] mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-mobile
To unsubscribe, send any mail to "[email protected]"
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.