public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Zhang Rui <rui.zhang@intel.com>
To: Dave Airlie <airlied@redhat.com>
Cc: len.brown@intel.com, torvalds@linuxfoundation.org,
	linux-kernel@vger.kernel.org,
	Igor Murzov <intergalactic.anonymous@gmail.com>,
	stable@vger.kernel.org
Subject: Re: Still use ACPI backlight control if _DOS doesn't exist
Date: Tue, 26 Jun 2012 10:03:37 +0800	[thread overview]
Message-ID: <1340676217.1682.50.camel@rui.sh.intel.com> (raw)
In-Reply-To: <1340624336-15048-1-git-send-email-airlied@redhat.com>

Hi, Dave,

How about this one, which I think is better? :)
http://marc.info/?l=linux-acpi&m=134015703925079&w=2

can you give it a try?

thanks,
rui

On 一, 2012-06-25 at 12:38 +0100, Dave Airlie wrote:
> This is a regression introduced by commit
> ea9f8856bd6d4ed45885b06a338f7362cd6c60e5
> 
> https://bugzilla.kernel.org/show_bug.cgi?id=43168
> 
> Some platforms don't have _DOS control method, but the ACPI
> backlight still works.
> We do not want to lose the backlight control ability on these platforms.
> 
> [airlied: this is breaking nouveau really badly on 3.4 and after and there is
> no movement on sending it upstream, so please apply]
> 
> Cc: Igor Murzov <intergalactic.anonymous@gmail.com>
> Cc: stable@vger.kernel.org
> Cc: len.brown@intel.com
> Signed-off-by: Zhang Rui <rui.zhang@intel.com>
> ---
>  drivers/acpi/video.c |   10 ++++++++--
>  1 file changed, 8 insertions(+), 2 deletions(-)
> 
> Index: rtd3/drivers/acpi/video.c
> ===================================================================
> --- rtd3.orig/drivers/acpi/video.c
> +++ rtd3/drivers/acpi/video.c
> @@ -565,8 +565,14 @@ acpi_video_bus_DOS(struct acpi_video_bus
>  	video->dos_setting = arg0.integer.value;
>  	status = acpi_evaluate_object(video->device->handle, "_DOS",
>  		&args, NULL);
> -	if (ACPI_FAILURE(status))
> -		return -EIO;
> +	if (ACPI_FAILURE(status)) {
> +		/*
> +		 * some platforms don't have _DOS, but the ACPI
> +		 * backlight control still works
> +		 */
> +		ACPI_DEBUG_PRINT((ACPI_DB_INFO, "No _DOS\n"));
> +		return 0;
> +	}
>  
>  	return 0;
>  }



      reply	other threads:[~2012-06-26  2:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-06-25 11:38 Still use ACPI backlight control if _DOS doesn't exist Dave Airlie
2012-06-26  2:03 ` Zhang Rui [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=1340676217.1682.50.camel@rui.sh.intel.com \
    --to=rui.zhang@intel.com \
    --cc=airlied@redhat.com \
    --cc=intergalactic.anonymous@gmail.com \
    --cc=len.brown@intel.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stable@vger.kernel.org \
    --cc=torvalds@linuxfoundation.org \
    /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