From: Jani Nikula Date: Tue, 12 Aug 2014 14:11:42 +0000 (+0300) Subject: drm/i915: switch off backlight for backlight class 0 brightness X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=e6755fb78e8f20ecadf2a4080084121336624ad9;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git drm/i915: switch off backlight for backlight class 0 brightness Make backlight class sysfs brightness 0 value switch off the backlight for connectors that have the backlight_power callback defined. For eDP, this has the similar caveats regarding power savings as bl_power as only the power sequencer backlight control is switched off. Signed-off-by: Jani Nikula Reviewed_by: Clinton Taylor Signed-off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c index af5435634929..764f9283e572 100644 --- a/drivers/gpu/drm/i915/intel_panel.c +++ b/drivers/gpu/drm/i915/intel_panel.c @@ -986,7 +986,8 @@ static int intel_backlight_device_update_status(struct backlight_device *bd) */ if (panel->backlight.enabled) { if (panel->backlight_power) { - bool enable = bd->props.power == FB_BLANK_UNBLANK; + bool enable = bd->props.power == FB_BLANK_UNBLANK && + bd->props.brightness != 0; panel->backlight_power(connector, enable); } } else {