linux-next.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
Cc: Thomas Renninger <trenn@suse.de>,
	ak@linux.intel.com, linux-acpi@vger.kernel.org,
	linux-next@vger.kernel.org,
	Andrew Morton <akpm@linux-foundation.org>,
	Julia Jomantaite <julia.jomantaite@gmail.com>,
	marcus@better.se, dannybaumann@web.de, corsac@debian.org,
	jesse.barnes@intel.com
Subject: Re: [PATCH 1/2] ACPI Video: Ignore devices that aren't present in hardware
Date: Fri, 4 Jul 2008 18:39:10 +0100	[thread overview]
Message-ID: <20080704173910.GA16595@srcf.ucam.org> (raw)
In-Reply-To: <20080704115519.GA7435@khazad-dum.debian.net>

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@srcf.ucam.org

  reply	other threads:[~2008-07-04 17:39 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-07-03 16:05 [PATCH 1/2] ACPI Video: Ignore devices that aren't present in hardware Thomas Renninger
2008-07-03 16:08 ` Matthew Garrett
2008-07-03 16:15   ` Thomas Renninger
2008-07-03 16:16     ` Matthew Garrett
2008-07-03 16:21       ` Yves-Alexis Perez
2008-07-03 19:24         ` Matthew Garrett
2008-07-04 10:08       ` Thomas Renninger
2008-07-04 10:18         ` Matthew Garrett
2008-07-04  3:09   ` Henrique de Moraes Holschuh
2008-07-04  9:13     ` Matthew Garrett
2008-07-04 11:55       ` Henrique de Moraes Holschuh
2008-07-04 17:39         ` Matthew Garrett [this message]
2008-07-04 19:49           ` Henrique de Moraes Holschuh
2008-07-05 15:46           ` Henrique de Moraes Holschuh

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080704173910.GA16595@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=ak@linux.intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=corsac@debian.org \
    --cc=dannybaumann@web.de \
    --cc=hmh@hmh.eng.br \
    --cc=jesse.barnes@intel.com \
    --cc=julia.jomantaite@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=marcus@better.se \
    --cc=trenn@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).