Commit ade28abd authored by Corentin Chary's avatar Corentin Chary Committed by Matthew Garrett

asus-wmi: don't update power and brightness when using scalar

But we can still do it on other boards, as this might happen
if the backlight driver change when update_bl is called.
Signed-off-by: default avatarCorentin Chary <corentin.chary@gmail.com>
Signed-off-by: default avatarMatthew Garrett <mjg@redhat.com>
parent 7a61d020
...@@ -1152,7 +1152,13 @@ static int update_bl_status(struct backlight_device *bd) ...@@ -1152,7 +1152,13 @@ static int update_bl_status(struct backlight_device *bd)
ctrl_param, NULL); ctrl_param, NULL);
if (asus->driver->quirks->store_backlight_power) if (asus->driver->quirks->store_backlight_power)
asus->driver->panel_power = bd->props.power; asus->driver->panel_power = bd->props.power;
} else {
/* When using scalar brightness, updating the brightness
* will mess with the backlight power */
if (asus->driver->quirks->scalar_panel_brightness)
return err;
}
if (asus->driver->quirks->scalar_panel_brightness) if (asus->driver->quirks->scalar_panel_brightness)
ctrl_param = get_scalar_command(bd); ctrl_param = get_scalar_command(bd);
else else
...@@ -1160,7 +1166,7 @@ static int update_bl_status(struct backlight_device *bd) ...@@ -1160,7 +1166,7 @@ static int update_bl_status(struct backlight_device *bd)
err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS, err = asus_wmi_set_devstate(ASUS_WMI_DEVID_BRIGHTNESS,
ctrl_param, NULL); ctrl_param, NULL);
}
return err; return err;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment