]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
drm/panel: simple: Update backlight state property
authorThierry Reding <treding@nvidia.com>
Fri, 17 Jun 2016 17:11:53 +0000 (19:11 +0200)
committerThierry Reding <treding@nvidia.com>
Mon, 11 Jul 2016 12:30:35 +0000 (14:30 +0200)
Some backlight drivers ignore the power property and instead only use
the state property. Fixup the panel driver to set the state property in
addition to the power property.

Signed-off-by: Thierry Reding <treding@nvidia.com>
drivers/gpu/drm/panel/panel-simple.c

index 359cd37d09cb2c2e9d02a1f8d6004bcf4af0dadf..f503d12b39309dec7c98c959bf8ed5e52bdf83a3 100644 (file)
@@ -168,6 +168,7 @@ static int panel_simple_disable(struct drm_panel *panel)
 
        if (p->backlight) {
                p->backlight->props.power = FB_BLANK_POWERDOWN;
+               p->backlight->props.state |= BL_CORE_FBBLANK;
                backlight_update_status(p->backlight);
        }
 
@@ -235,6 +236,7 @@ static int panel_simple_enable(struct drm_panel *panel)
                msleep(p->desc->delay.enable);
 
        if (p->backlight) {
+               p->backlight->props.state &= ~BL_CORE_FBBLANK;
                p->backlight->props.power = FB_BLANK_UNBLANK;
                backlight_update_status(p->backlight);
        }