linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Len Brown <lenb@kernel.org>
To: Zhang Rui <rui.zhang@intel.com>
Cc: linux-acpi@vger.kernel.org
Subject: Re: [PATCH] ACPI video hotkey: set _DOS to 0 by default
Date: Tue, 18 Sep 2007 13:38:07 -0400	[thread overview]
Message-ID: <200709181338.08032.lenb@kernel.org> (raw)
In-Reply-To: <1189741582.10428.34.camel@acpi-hp.sh.intel.com>

Applied.

thanks,
-Len

On Thursday 13 September 2007 23:46, Zhang Rui wrote:
> Subject: set _DOS to 0 by default
> From: Zhang Rui <rui.zhang@intel.com>
> 
> Many ACPI machines currently reprogram the active display output
> automatically when the user presses the display toggle switch on
> the keyboard. However, this behavior violates the ACPI spec,
> because the system modifies some graphics device registers.
> 
> "_DOS = 1" means that BIOS will switch the display, and ACPI is
> not aware of the display switch hotkey pressing.
> 
> And "_DOS = 0" means that BIOS will not switch the display
> but just notify ACPI instead.
> 
> We set _DOS to 0 by default from now on because ACPI video driver
> has the mechanism to notify the user space when the display toggle
> switch is pressed, i.e. ACPI video driver can send the hotkey events
> via the input layer.
> And X can/should get this event and call the native video device
> driver to do the actual display switch work.
> 
> Note: formerly we set _DOS to 1 to let BIOS handle the display switch,
>       but this doesn't always work on all platforms even in console mode.
>       http://bugzilla.kernel.org/show_bug.cgi?id=6001
> 
> Note: with this patch applied, in console mode, hotkey pressing may not
>       work because ACPI only export the hotkey events to user space while
>       X is not running, so no action is taken for this event.
>       users may need to "echo 1 >/proc/acpi/video/xxx/DOS" so that they
>       can switch the display with the help of BIOS.
> 
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/acpi/video.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> Index: linux-2.6/drivers/acpi/video.c
> ===================================================================
> --- linux-2.6.orig/drivers/acpi/video.c
> +++ linux-2.6/drivers/acpi/video.c
> @@ -1754,7 +1754,7 @@ static int acpi_video_bus_put_devices(st
>  
>  static int acpi_video_bus_start_devices(struct acpi_video_bus *video)
>  {
> -	return acpi_video_bus_DOS(video, 1, 0);
> +	return acpi_video_bus_DOS(video, 0, 0);
>  }
>  
>  static int acpi_video_bus_stop_devices(struct acpi_video_bus *video)
> 

      reply	other threads:[~2007-09-18 17:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-14  3:46 [PATCH] ACPI video hotkey: set _DOS to 0 by default Zhang Rui
2007-09-18 17:38 ` Len Brown [this message]

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=200709181338.08032.lenb@kernel.org \
    --to=lenb@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=rui.zhang@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 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).