public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Artem Savkov <artem.savkov@gmail.com>
To: Danny Baumann <dannybaumann@web.de>
Cc: 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 10:46:19 +0400	[thread overview]
Message-ID: <20130331064619.GA11544@thinkpad.lan> (raw)
In-Reply-To: <3fb82299-bdb9-4842-bd55-f3b87d2d789e@email.android.com>

On Sun, Mar 31, 2013 at 08:15:14AM +0200, Danny Baumann wrote:
> Artem Savkov <artem.savkov@gmail.com> schrieb:
> >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.
> I don't think this change is correct. As level was passed as parameter into the evaluation of _BQC, *level contains the AML returned brightness level afterwards, so it's correct to use it as an input to acpi_video_bqc_value_to_level(). Actually, the whole point of acpi_video_device_lcd_get_level_current() is to update device->brightness->curr, so it doesn't make sense to me to use it in that function.
> 
> What's the exact problem this patch tries to solve?

I'm running a -next kernel on my laptop and couple of days ago keyboard
backlight controls stopped working: only 2 lower brightness levels. I've
debugged it a bit and found out that acpi_video_switch_brightness() calls
acpi_video_device_lcd_get_level_current() with level uninitialized and
always gets lowest posible value.

-- 
Regards,
Artem

  reply	other threads:[~2013-03-31  6:46 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-03-30 13:01 [PATCH] acpi/video: lcd_get_level_current doen't return current level Artem Savkov
2013-03-31  1:56 ` Rafael J. Wysocki
2013-03-31  6:15 ` Danny Baumann
2013-03-31  6:46   ` Artem Savkov [this message]
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=20130331064619.GA11544@thinkpad.lan \
    --to=artem.savkov@gmail.com \
    --cc=aaron.lu@intel.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