Re: [PATCH 1/2] ACPI Video: Ignore devices that aren't present in hardware

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Got it. The reason for the delay is that BRTO sits in a loop for no 
obvious reason unless BRTF is cleared. The only thing that clears BRTF 
is the PWMS function, which isn't called anywhere in the ACPI tables. 
The NetBSD driver has the following code:

	/* Claim ownership of brightness control */
	param[0].Integer.Value = 0;
	(void)AcpiEvaluateObject(sc->sc_node->ad_handle, "PWMS", &params, NULL);

and doing this in thinkpad_acpi means my brightness control works in an 
acceptably speedy manner with opregion. Henrique, any thoughts on this? 
If you're happy with it, we can get opregion support into .27 and add 
the patch to remove duplicate ACPI video devices and everything will 
work in a beautiful and harmonious manner.

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index b596929..bbc45c8 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -899,6 +899,9 @@ static int __init tpacpi_check_std_acpi_brightness_support(void)
 
 	if (ACPI_SUCCESS(status) && bcl_levels > 2) {
 		tp_features.bright_acpimode = 1;
+		/* Set ACPI mode */
+		if (!acpi_evalf(hkey_handle, NULL, "PWMS", "vd", 0))
+			printk(TPACPI_INFO "Failed to claim backlight\n");
 		return (bcl_levels - 2);
 	}

-- 
Matthew Garrett | mjg59@xxxxxxxxxxxxx
--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux