mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rafael J. Wysocki" <rjw@sisk.pl>
To: Artem Savkov <artem.savkov@gmail.com>
Cc: dannybaumann@web.de, aaron.lu@intel.com,
	rafael.j.wysocki@intel.com, linux-acpi@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] acpi/video: lcd_get_level_current doen't return current level
Date: Sun, 31 Mar 2013 03:56:50 +0200	[thread overview]
Message-ID: <5996696.NNHVTCA6T8@vostro.rjw.lan> (raw)
In-Reply-To: <1364648501-5127-1-git-send-email-artem.savkov@gmail.com>

On Saturday, March 30, 2013 05:01:41 PM Artem Savkov wrote:
> acpi_video_device_lcd_get_level_current() called acpi_video_bqc_value_to_level()
> with "*level" as a second argument, resulting in level being returned based on
> initial input, not current brightness, breaking backlight controls.

This looks like a valid fix, but (1) is the problem being fixed a regression
and if so, which was the last working kernel and (2) do you have any pointers
to bug reports/BZ entries related to that?

Also, do I assume correctly that you've tested it?

Rafael


> Signed-off-by: Artem Savkov <artem.savkov@gmail.com>
> ---
>  drivers/acpi/video.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/acpi/video.c b/drivers/acpi/video.c
> index 3cdd047..68a777b 100644
> --- a/drivers/acpi/video.c
> +++ b/drivers/acpi/video.c
> @@ -505,7 +505,8 @@ acpi_video_device_lcd_get_level_current(struct acpi_video_device *device,
>  				return 0;
>  			}
>  
> -			*level = acpi_video_bqc_value_to_level(device, *level);
> +			*level = acpi_video_bqc_value_to_level(device,
> +					device->brightness->curr);
>  
>  			for (i = 2; i < device->brightness->count; i++)
>  				if (device->brightness->levels[i] == *level) {
> 
-- 
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.

  reply	other threads:[~2013-03-31  1:49 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30 13:01 Artem Savkov
2013-03-31  1:56 ` Rafael J. Wysocki [this message]
2013-03-31  6:15 ` Danny Baumann
2013-03-31  6:46   ` Artem Savkov
2013-03-31  7:04     ` Danny Baumann
2013-03-31  8:16       ` Artem Savkov
2013-03-31 10:07         ` Aaron Lu
2013-03-31 10:37           ` Artem Savkov

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=5996696.NNHVTCA6T8@vostro.rjw.lan \
    --to=rjw@sisk.pl \
    --cc=aaron.lu@intel.com \
    --cc=artem.savkov@gmail.com \
    --cc=dannybaumann@web.de \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rafael.j.wysocki@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

all inboxes | Powered by JetHome®