linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: joeyli <jlee@suse.com>
To: Alex Hung <alex.hung@canonical.com>
Cc: rui.zhang@intel.com, linux-acpi@vger.kernel.org
Subject: Re: [PATCH] acpi: fix brightness level is initialized to zero when BIOS does not restore the brightness value to _BQC.
Date: Mon, 01 Oct 2012 14:47:13 +0800	[thread overview]
Message-ID: <1349074033.24232.19.camel@linux-s257.site> (raw)
In-Reply-To: <1349069987-23992-1-git-send-email-alex.hung@canonical.com>

Hi Alex, 

於 一,2012-10-01 於 13:39 +0800,Alex Hung 提到:
> Signed-off-by: Alex Hung <alex.hung@canonical.com>
> ---
>  drivers/acpi/video.c |    4 ++++
>  1 files changed, 4 insertions(+), 0 deletions(-)
> 
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index 42b226e..eaa9573 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -724,6 +724,10 @@ acpi_video_init_brightness(struct acpi_video_device *device)
>  				if (level_old == br->levels[i])
>  					level = level_old;
>  		}
> +
> +		if (level == 0)
> +			level = br->levels[(br->count) / 2 + 1];

Looks here used the 50% brightness level.

Per comment in video.c, we want set the backlight to max_level when
level_old is invalid:

        if (!br->flags._BQC_use_index) {
                /*
                 * Set the backlight to the initial state.
                 * On some buggy laptops, _BQC returns an uninitialized value
                 * when invoked for the first time, i.e. level_old is invalid.
                 * set the backlight to max_level in this case
                 */

I think here used max_level to fulfill it, e.g.
	
+		if (level == 0)
+			level = max_level;

How do you think?

> +
>  		goto set_level;
>  	}
>  

Thanks a lot!
Joey Lee




--
To unsubscribe from this list: send the line "unsubscribe linux-acpi" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2012-10-01  6:53 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-01  5:39 [PATCH] acpi: fix brightness level is initialized to zero when BIOS does not restore the brightness value to _BQC Alex Hung
2012-10-01  6:47 ` joeyli [this message]
2012-10-01  7:03   ` Alex Hung
2012-10-01  7:17     ` joeyli
2012-10-01  8:34       ` joeyli
2012-10-01  9:11         ` Alex Hung
2012-10-01  9:19           ` joeyli
2012-10-01 13:36             ` Zhang, Rui
2012-10-01 15:26               ` Alex Hung
2012-10-08  4:34                 ` Zhang, Rui
2012-10-08  4:39                   ` Alex Hung

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=1349074033.24232.19.camel@linux-s257.site \
    --to=jlee@suse.com \
    --cc=alex.hung@canonical.com \
    --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).