All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: yakui_zhao <yakui.zhao@intel.com>
Cc: Jesse Barnes <jbarnes@virtuousgeek.org>,
	"intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"linux-acpi@vger.kernel.org" <linux-acpi@vger.kernel.org>
Subject: Re: [RFC] i915/acpi: add lid status notification and detection
Date: Tue, 19 May 2009 18:15:45 +0100	[thread overview]
Message-ID: <20090519171545.GA17801@srcf.ucam.org> (raw)
In-Reply-To: <1242264144.3773.415.camel@localhost.localdomain>

On Thu, May 14, 2009 at 09:22:24AM +0800, yakui_zhao wrote:
> On Thu, 2009-05-14 at 02:57 +0800, Jesse Barnes wrote:
> > In the i915 driver we want to know if the lid is open or closed and
> > when its status changes, since we want to use the closed state to
> > indicate that the LFP is unavailable (disconnected in KMS terms) and
> > open to indicate that it's usable.
> > 
> > To that end, this patch adds some code to the ACPI button driver to
> > send us lid notifications as they occur and provide us with current lid
> > status when called.
> > 
> > It's a bit ugly, and I don't handle the inter-module dependencies very
> > well at this point, but you should get the idea.
> The tight module dependency. If the ACPI button is compiled as module
> and i915 is compiled as built-in kernel, we will fail in kernel
> compilation. 

Yes, it needs a Kconfig fixup.

> > There's also a policy question here.  On some machines, a lid close
> > will cause the ACPI firmware to program the GPU, disabling the pipe
> > associated with the panel.  Should we detect this and turn it back on
> > at open time?  That could be dangerous if userspace has received the
> > LVDS hotplug event and changed the config out from under us...
> > 
> > Comments?
> It seems that the LID status is used to determine whether the LVDS is
> connected.
> It is not reliable. On some boxes the initial LID status is incorrect.
> Maybe the LID status is open. But the ACPI returns that the LID is
> close. In such case the LVDS is not initialized and user can't get the
> output.

Really? I haven't seen any cases of this. They'll fail in all sorts of 
fun ways with modern userland.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  parent reply	other threads:[~2009-05-19 17:15 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-13 18:57 [RFC] i915/acpi: add lid status notification and detection Jesse Barnes
2009-05-14  1:22 ` yakui_zhao
2009-05-15 18:16   ` [PATCH] " Jesse Barnes
2009-05-19 17:15   ` Matthew Garrett [this message]
2009-05-21  8:57     ` [RFC] " Zhang Rui
2009-05-21 16:34       ` Jesse Barnes
2009-05-22  1:22         ` [Intel-gfx] " Fu Michael
2009-05-22  1:26           ` Matthew Garrett
2009-05-22  2:03             ` Zhang Rui
2009-05-27  8:58           ` Jesse Barnes
2009-05-27 13:41             ` Fu Michael
2009-06-11  7:16             ` yakui_zhao
2009-06-16 18:33               ` Jesse Barnes
2009-06-16 19:08                 ` Corentin Chary
2009-06-17  2:32                 ` yakui_zhao
2009-06-17 23:10                   ` Jesse Barnes
2009-07-07 22:51                     ` Jesse Barnes
2009-06-18 15:49                 ` Thomas Renninger

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=20090519171545.GA17801@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jbarnes@virtuousgeek.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=yakui.zhao@intel.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.