From owner-freebsd-acpi@FreeBSD.ORG Tue Mar 20 04:52:48 2007 Return-Path: X-Original-To: acpi@freebsd.org Delivered-To: freebsd-acpi@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 061B516A400 for ; Tue, 20 Mar 2007 04:52:48 +0000 (UTC) (envelope-from grafan@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.175]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0DF13C465 for ; Tue, 20 Mar 2007 04:52:47 +0000 (UTC) (envelope-from grafan@gmail.com) Received: by ug-out-1314.google.com with SMTP id 71so1480549ugh for ; Mon, 19 Mar 2007 21:52:46 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=HblR8AnhpviZYgxGeWwyUj9b7rYZ5nH8PlT6f9M1iChDogDnXCv4UZcslmx92SgJxoK6NGqn4YemkjdLG1pCh8zspVZxYCZS4ZOvbuhpY9lM93WmhUKiWR4ofHFRuM4/Mkas5DcuSgsKwHY/nzsJRB3iDqbRd3wMX/jAMVeOAQQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=jh+Yh1JeZdVCBcRbdTeC11XIXmKxGhJoWDuGnJNBqq6wyfe+CopDDmm52mSEp7K8bhFuvq/3l9vYIY+wezHOG7M8CSVEKw4dWjpnoUx8FqpGMQXXDUtNB9u+Eso7q0wXmqIGEh+j8uVmvRxDTzQprJZlLQLjN0LBsa3Jf3rup1Q= Received: by 10.65.122.20 with SMTP id z20mr10567983qbm.1174364788666; Mon, 19 Mar 2007 21:26:28 -0700 (PDT) Received: by 10.140.23.10 with HTTP; Mon, 19 Mar 2007 21:26:28 -0700 (PDT) Message-ID: <6eb82e0703192126y41dd2c49n8522f58cacccdfa9@mail.gmail.com> Date: Tue, 20 Mar 2007 12:26:28 +0800 From: "Rong-en Fan" To: "Nate Lawson" In-Reply-To: <45FF31C2.1040107@root.org> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <6eb82e0703161009w15787d99p51510299fa0e1e45@mail.gmail.com> <1174078831.829.11.camel@RabbitsDen> <6eb82e0703170100v572a0794q334dc34bec992685@mail.gmail.com> <20070317170959.f48f5bf6.taku@tackymt.homeip.net> <6eb82e0703170210t3d4be248w64b7cf9981880bbe@mail.gmail.com> <20070319025520.69486e29.taku@tackymt.homeip.net> <6eb82e0703181159vcd095f9k4d65a8b3231c1bf@mail.gmail.com> <45FF31C2.1040107@root.org> Cc: acpi@freebsd.org, Alexandre Sunny Kovalenko , freebsd-mobile@freebsd.org Subject: Re: ThinkPad x60 and FN keys X-BeenThere: freebsd-acpi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: ACPI and power management development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Mar 2007 04:52:48 -0000 On 3/20/07, Nate Lawson wrote: > Rong-en Fan wrote: > > On 3/19/07, Taku YAMAMOTO wrote: > >> On Sat, 17 Mar 2007 17:10:38 +0800 > >> Fine. > >> It's expected that brightness hotkeys aren't functional with > >> acpi_video on > >> recent ThinkPads because their BIOS stop handling of the brightness and > >> rely on OS once acpi_video gets involved. > >> > >> The acpi_video module should of cource be enhanced to handle these > >> brightness events defined in ACPI 3.0 spec. If I would have some spare > >> time... > > > > Thank you. In the mean time, could we get the patch committed? > > (I'm CC'ing Nate Lawson) > > > > BTW, if I understand you correctly, when acpi_video is loaded, fn+home/end > > will generate some events to acpi_video, but our acpi_video does not handle > > these events so the brightness are not adjusted? Is that right? > > > > Regards, > > Rong-En Fan > > > > == > > > > --- acpi_ec.c-1.69 Tue Feb 27 09:14:20 2007 > > +++ sys/dev/acpica/acpi_ec.c Tue Feb 27 14:39:52 2007 > > @@ -825,6 +825,11 @@ EcGpeHandler(void *Context) > > CTR1(KTR_ACPI, "ec event was IBE/OBF, status %#x", EcStatus); > > sc->ec_csrvalue = EcStatus; > > wakeup(&sc->ec_csrvalue); > > + if (!sc->ec_sci_pend) { > > + Status = AcpiEnableGpe(sc->ec_gpehandle, sc->ec_gpebit, ACPI_ISR); > > + if (ACPI_FAILURE(Status)) > > + printf("EcGpeHandler: AcpiEnableEvent failed\n"); > > + } > > } else if (!sc->ec_sci_pend) { > > /* SCI bit set and no pending query handler, so schedule one. */ > > CTR0(KTR_ACPI, "ec queueing gpe handler"); > > Crap, that is a bug. In the path where the event was an SCI, we now no > longer re-enable the GPE. Thanks for pointing this out. > > I've committed a fix in rev 1.71. See if it helps. Yes. It works. Thank you! Regards, Rong-En Fan