• Zhang Rui's avatar
    ACPI video: handle indexed _BQC correctly · e047cca6
    Zhang Rui authored
    In the current code, for a box with an indexed _BQC method, we
    1. get the current brightness level by evaluating _BQC
    2. set the value gotten in step 1 to _BCM
    3. get the current brightness level again
    4. set the _BQC_use_index flag if the results gotten
       in step 1 and in step 3 don't equal.
    
    But this logic doesn't work actually, because the _BQC_use_index
    is not set when acpi_video_device_lcd_set_level is invoked.
    This results in a failure in step 2.
    http://bugzilla.kernel.org/show_bug.cgi?id=12249#c83
    
    Now, we set the _BQC_use_index flag after invoking _BQC for the first
    time. And reevaluate the _BQC to get the correct brightness level.
    Signed-off-by: default avatarZhang Rui <rui.zhang@intel.com>
    Signed-off-by: default avatarLen Brown <len.brown@intel.com>
    e047cca6
video.c 57.8 KB