kernel
Revision | c776aaf043fdba0d0f767a8b827c8b4cbdbf8d1f (tree) |
---|---|
Time | 2019-06-13 01:05:17 |
Author | lambdadroid <lambdadroid@gmai...> |
Commiter | Chih-Wei Huang |
ANDROID: drm/i915: Avoid resetting brightness if set to minimum (v2)
Right now, the brightness is reset to maximum if it was set to
minimum before the backlight was disabled. This looks bad when
turning the screen back on because it will actually fade down
instead of fade up when a lower brightness is set.
Just keep the brightness as-is after turning backlight on so
userspace can directly set the correct brightness value.
v2: Keep check but reset brightness only if below minimum.
@@ -1104,7 +1104,7 @@ void intel_panel_enable_backlight(const struct intel_crtc_state *crtc_state, | ||
1104 | 1104 | |
1105 | 1105 | WARN_ON(panel->backlight.max == 0); |
1106 | 1106 | |
1107 | - if (panel->backlight.level <= panel->backlight.min) { | |
1107 | + if (panel->backlight.level < panel->backlight.min) { | |
1108 | 1108 | panel->backlight.level = panel->backlight.max; |
1109 | 1109 | if (panel->backlight.device) |
1110 | 1110 | panel->backlight.device->props.brightness = |