Re: [PATCH] acpi: video: fix reversed indexed BQC

From: Felipe Contreras
Date: Fri Aug 02 2013 - 03:59:29 EST

On Fri, Aug 2, 2013 at 1:56 AM, Aaron Lu <> wrote:
> On 08/02/2013 02:44 PM, Felipe Contreras wrote:

>> 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:

I don't see any real solution for the ACPI driver.

> I have a patch to enhance the quirk some time ago:

I think this is unnecessarily complicated; the comment makes it clear
that the purpose is to find out if _BQC is working, and this does the