Re: [PATCH 10/11] thinkpad_acpi: fingers off backlight if video.ko is serving this functionality

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

 



On Wednesday 16 July 2008 15:38:39 Henrique de Moraes Holschuh wrote:
> On Wed, 16 Jul 2008, Matthew Garrett wrote:
> > On Wed, Jul 16, 2008 at 09:40:44AM -0300, Henrique de Moraes Holschuh 
wrote:
> > > One question: is there a good reason to actually have the hotkey
> > > handling for IGD mode directly in thinkpad-acpi?  We don't do it for
> > > Vista BIOS, video.ko doesn't do it either (anymore)... and I would make
> > > it configurable for IBM firmware if I could.
> >
> > No. There's no reason to have IGD handling in thinkpad-acpi at all.
I haven't seen the video driver on a T61 with Intel card doing proper 
backlight switching on the correct device yet.

> Then please leave that part out of the final patch.  It will make the
> patch a LOT simpler (no need to muck with anything hotkey_*).
Ok. Attached.

> But the observation about extending brightness_mode to
> force-select/unselect igdmode stands anyway.
Ok, that's fair enough.

I wonder whether we still need the BCL queries in thinkpad_acpi.c?
Shouldn't (at least in theory) all ThinkPads with generic backlight
functions work with video.ko now?

Maybe now it's a bit too soon, but getting rid of these functions would
be a nice cleanup.

Below one is compile tested...

        Thomas

----
thinkpad_acpi: fingers off backlight if video.ko is serving this functionality

Signed-off-by: Thomas Renninger <trenn@xxxxxxx>

diff --git a/drivers/misc/thinkpad_acpi.c b/drivers/misc/thinkpad_acpi.c
index b596929..50da049 100644
--- a/drivers/misc/thinkpad_acpi.c
+++ b/drivers/misc/thinkpad_acpi.c
@@ -4750,17 +4750,26 @@ static int __init brightness_init(struct 
ibm_init_struct *iibm)
 	 */
 	b = tpacpi_check_std_acpi_brightness_support();
 	if (b > 0) {
-		if (thinkpad_id.vendor == PCI_VENDOR_ID_LENOVO) {
-			printk(TPACPI_NOTICE
-			       "Lenovo BIOS switched to ACPI backlight "
-			       "control mode\n");
-		}
-		if (brightness_enable > 1) {
-			printk(TPACPI_NOTICE
-			       "standard ACPI backlight interface "
-			       "available, not loading native one...\n");
-			return 1;
-		}
+
+		if (acpi_video_backlight_support()) {
+			if (brightness_enable > 1) {
+				printk(TPACPI_NOTICE
+				       "Standard ACPI backlight interface "
+				       "available, not loading native one.\n");
+				return 1;
+			} else if (brightness_enable == 1) {
+				printk(TPACPI_NOTICE
+				       "Backlight control force, even standard "
+				       "ACPI backlight interface available\n");
+			}
+		} else {
+			if (brightness_enable > 1) {
+				printk(TPACPI_NOTICE
+				       "Standard ACPI backlight interface not "
+				       "available, thinkpad_acpi driver "
+				       "will take over control\n");
+			}
+ 		}
 	}
 
 	if (!brightness_enable) {
--
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