From: Aaron Lu <aaron.lu@intel.com>
To: Felipe Contreras <felipe.contreras@gmail.com>
Cc: linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org,
"Rafael J. Wysocki" <rjw@sisk.pl>, Len Brown <lenb@kernel.org>,
Zhang Rui <rui.zhang@intel.com>
Subject: Re: [PATCH] acpi: video: fix reversed indexed BQC
Date: Fri, 02 Aug 2013 14:56:38 +0800 [thread overview]
Message-ID: <51FB5826.80305@intel.com> (raw)
In-Reply-To: <CAMP44s1RkwTfxdoiARHgREy-fwLuRu2tKbM-4kB3+Xf3Sme5Uw@mail.gmail.com>
On 08/02/2013 02:44 PM, Felipe Contreras wrote:
> On Thu, Aug 1, 2013 at 11:59 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>> On 08/02/2013 12:50 PM, Felipe Contreras wrote:
>>> On Thu, Aug 1, 2013 at 11:30 PM, Aaron Lu <aaron.lu@intel.com> wrote:
>
>>>> Please see acpi_video_bqc_quirk, we set _BQC_use_index by revert the
>>>> level on a reversed _BCL, so we will need to revert level here too.
>>>
>>> I cannot parse that sentence, but nothing needs to change there; to
>>> find out if _BQC is using an index, we need to see if the returned
>>> value is the index of the level we are looking for, and to find that
>>> out we need the original list of levels, which can be found by
>>> reverting the already reverted list. If this wasn't the case there
>>
>> Yes, but instead of reverting the already reverted list, we revert the
>> returned value to get the correct index in the reverted list. But your
>> patch removes the revert, is it correct?
>
> It removes the revert in acpi_video_bqc_value_to_level(), not
> acpi_video_bqc_quirk(). If I remove both reverts it doesn't work on
Of course I mean you remove the revert in acpi_video_bqc_value_to_level
as is shown in your patch.
> this machine, however, I think it works by accident.
>
> The initial _BCM commands don't work, so the level remains at 100%.
> Since the level is max_level, acpi_video_bqc_quirk() tries with the
> first level, which is 0, and 0 happens to be the index of 100.
>
> So _BQC is returning 100, which is not the index of 0 (what we tested
> for), but actually 100.
>
> I think the current code is correct, but acpi_video_bqc_quirk() should
> be testing br->levels[3], or anything other than 0/100 which can be
> easily confused.
>
> If so, the code would find that _BQC doesn't work on this machine (in
> win8 mode)... at least initially. My guess is that it only starts to
> work after acpi_video_bus_start_devices() is called.
>
> Forcing br->flags._BQC_use_index = 0 seems to work.
Seems ASUS machines tend to have this issue:
https://bugzilla.kernel.org/show_bug.cgi?id=52951
https://bugzilla.kernel.org/show_bug.cgi?id=56711
I have a patch to enhance the quirk some time ago:
https://github.com/aaronlu/linux/commit/0a3d2c5b59caf80ae5bb1ca1fda0f7bf448b38c9
But at that time we have decided to remove acpi video interface if this
is a win8 system(all of these affected systems are win8), so I didn't
submit it. Can you please give it a test? Perhaps I can send it now.
-Aaron
next prev parent reply other threads:[~2013-08-02 6:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-01 23:34 [PATCH] acpi: video: fix reversed indexed BQC Felipe Contreras
2013-08-02 2:03 ` Aaron Lu
2013-08-02 4:11 ` Felipe Contreras
2013-08-02 4:30 ` Aaron Lu
2013-08-02 4:50 ` Felipe Contreras
2013-08-02 4:59 ` Aaron Lu
2013-08-02 6:44 ` Felipe Contreras
2013-08-02 6:56 ` Aaron Lu [this message]
2013-08-02 7:59 ` Felipe Contreras
2013-08-02 8:06 ` Aaron Lu
2013-08-02 8:14 ` Felipe Contreras
2013-08-02 8:25 ` Aaron Lu
2013-08-02 11:20 ` Felipe Contreras
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=51FB5826.80305@intel.com \
--to=aaron.lu@intel.com \
--cc=felipe.contreras@gmail.com \
--cc=lenb@kernel.org \
--cc=linux-acpi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=rjw@sisk.pl \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.