Re: [PATCH 7/7] Who controls brightness functionality: vendor specific or generic video driver

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

 



On Wednesday 16 April 2008 20:02:52 Thomas Renninger wrote:
> Who controls brightness functionality: vendor specific or generic video
> driver
>
> Depending on the capablity of ACPI graphics devices and whether they
> implement all necessary functions so that the generic ACPI video driver can
> control them, decide at driver load time whether a vendor specific device
> driver or the ACPI video driver should control the brighntess
> functionality.
>
> Signed-off-by: Thomas Renninger <trenn@xxxxxxx>

NACK the acer-wmi bit, use the following patch instead (feel free to fold it 
into your superpatch though with my sign-off).

-Carlos
--
acer-wmi: Use ACPI video driver instead of WMI where possible

If the generic ACPI video driver can control the video, then we should hand
off control to it, rather than try to handle it ourselves.

Signed-off-by: Carlos Corbacho <carlos@xxxxxxxxxxxxxxxxxxx>
---

 drivers/misc/acer-wmi.c |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)


diff --git a/drivers/misc/acer-wmi.c b/drivers/misc/acer-wmi.c
index dd13a37..0d69bc5 100644
--- a/drivers/misc/acer-wmi.c
+++ b/drivers/misc/acer-wmi.c
@@ -1100,6 +1100,14 @@ static int __init acer_wmi_init(void)
 		return -ENODEV;
 	}
 
+	if (acpi_video_support & ACPI_VIDEO_BRIGHTNESS &&
+		!(acpi_video_support & ACPI_VIDEO_FORCE_VENDOR_SPECIFIC) &&
+		has_cap(ACER_CAP_BRIGHTNESS)) {
+		interface->capability &= ~ACER_CAP_BRIGHTNESS;
+		printk(ACER_INFO "Brightness must be controlled by "
+		       "generic video driver\n");
+	}
+
 	if (platform_driver_register(&acer_platform_driver)) {
 		printk(ACER_ERR "Unable to register platform driver.\n");
 		goto error_platform_register;
--
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