Skip to contentSkip to conversation

drm/panel: simple: Update backlight state property

PATCH New Thierry Reding 1 participant 1 message Jun 17, 2016

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/panel: simple: Update backlight state property

From: Thierry Reding <[email protected]>

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.

---
Jingoo, Lee,

What's the correct way to do this? Should we update both power and state properties, or just state? I didn't find code anywhere to keep both in sync, so it seemed like both needed to be set explicitly.

 drivers/gpu/drm/panel/panel-simple.c | 2 ++
 1 file changed, 2 insertions(+)
drivers/gpu/drm/panel/panel-simple.c +2 -0
index 359cd37d09cb..f503d12b3930 100644
@@ -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);
 	}
Signature · 1 line
2.8.3