Re: x60s: problems with brightness keys (again)

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

 



On Thu, Oct 09, 2008 at 11:24:20PM -0300, Henrique de Moraes Holschuh wrote:
> On Fri, 10 Oct 2008, Paride Legovini wrote:
> > Anyway, this becomes a minor issue after the delay is gone. Do you plan
> > to include Matthew Garrett's into thinkpad-acpi? I'm still available if
> > you need to test something on an affected system. Just ask.
> 
> Exactly which patch from Matthew are you talking about?

Attached
-- 
Yves-Alexis
>From mjg59@xxxxxxxxxxxxx Wed Aug  6 08:34:54 2008
Return-Path: <prvs=010410812f=mjg59@xxxxxxxxxxxx>
Delivered-To: corsac@xxxxxxxxxx
Received: from localhost (localhost [127.0.0.1]) by molly.corsac.net
	(Postfix) with ESMTP id 914B282D7D for <corsac@xxxxxxxxxx>; Wed,  6 Aug
	2008 08:34:54 +0200 (CEST)
X-Virus-Scanned: Debian amavisd-new at corsac.net
Received: from molly.corsac.net ([127.0.0.1]) by localhost
	(molly.corsac.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id
	vTWbo9jTRz1K for <corsac@xxxxxxxxxx>; Wed,  6 Aug 2008 08:34:47 +0200 (CEST)
Received: from master.debian.org (master.debian.org [70.103.162.29]) by
	molly.corsac.net (Postfix) with ESMTP id A02E682D74 for
	<corsac@xxxxxxxxxx>; Wed,  6 Aug 2008 08:34:47 +0200 (CEST)
Received: from cavan.codon.org.uk ([93.93.128.6] helo=vavatch.codon.org.uk)
	by master.debian.org with esmtp (Exim 4.63) (envelope-from
	<prvs=010410812f=mjg59@xxxxxxxxxxxx>) id 1KQcbe-0005z2-Jo for
	corsac@xxxxxxxxxx; Wed, 06 Aug 2008 06:34:46 +0000
Received: from mjg59 by vavatch.codon.org.uk with local (Exim 4.69)
	(envelope-from <mjg59@xxxxxxxxxxxx>) id 1KQcbZ-0003mT-6r; Wed, 06 Aug 2008
	07:34:41 +0100
Date: Wed, 6 Aug 2008 07:34:41 +0100
From: Matthew Garrett <mjg59@xxxxxxxxxxxxx>
To: Henrique de Moraes Holschuh <hmh@xxxxxxxxxx>
Cc: Yves-Alexis Perez <corsac@xxxxxxxxxx>, airlied@xxxxxxxx, linux-kernel@xxxxxxxxxxxxxxx, linux-acpi@xxxxxxxxxxxxxxx
Subject: Re: [PATCH] Add Intel ACPI IGD OpRegion support
Message-ID: <20080806063441.GA14455@xxxxxxxxxxxxx>
References: <20080805183725.GA4468@xxxxxxxxxxxxx>
	 <1217965470.5449.4.camel@hidalgo> <1217972874.4540.3.camel@hidalgo>
	 <20080806001301.GA10630@xxxxxxxxxxxxx>
	 <20080806023247.GA4665@xxxxxxxxxxxxxxxxxxxxx>
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <20080806023247.GA4665@xxxxxxxxxxxxxxxxxxxxx>
User-Agent: Mutt/1.5.12-2006-07-14
X-SA-Exim-Connect-IP: <locally generated>
X-SA-Exim-Mail-From: mjg59@xxxxxxxxxxxx
X-SA-Exim-Scanned: No (on vavatch.codon.org.uk); SAEximRunCond expanded to
	false
X-Evolution-Source: imap://corsac%40corsac.net@xxxxxxxxxxxxxxx/
Content-Transfer-Encoding: 8bit

On Tue, Aug 05, 2008 at 11:32:48PM -0300, Henrique de Moraes Holschuh wrote:
> On Wed, 06 Aug 2008, Matthew Garrett wrote:
> > The 750ms delay is from thinkpad-acpi. I sent a patch to Henrique which 
> > makes it go away, but I'm not entirely sure what the ACPI method 
> > concerned is supposed to be doing. The opregion code won't currently run 
> > until X is started because the drm layer requires X to be the foreground 
> > vt before handling IRQs.
> 
> Well, for what is it worth, thinkpad-acpi has a knob (brightness_mode) which
> can be used.  Set it to CMOS mode (see docs).  From what I recall, it should
> do what your patch does.

It doesn't seem to, no. I should have been clearer - the delay is in the 
DSDT (not thinkpad-acpi itself), but there's a Thinkpad-specific ACPI 
call that seems to be needed in order to delay it. Here's the patch 
again.

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
-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
ibm-acpi-devel mailing list
ibm-acpi-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.sourceforge.net/lists/listinfo/ibm-acpi-devel

[Index of Archives]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Photo]     [Yosemite Photos]     [Yosemite Advice]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Device Mapper]

  Powered by Linux