[PATCH v2 19/24] drm/tilcdc: Backlight update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Introduce backlight_{enable,disable} to enable/disable backlight.
Dropped NULL check as backlight_{enable,disable} handles this.

Signed-off-by: Sam Ravnborg <sam@xxxxxxxxxxxx>
Cc: Rob Clark <robdclark@xxxxxxxxx>
Cc: Ezequiel Garcia <ezequiel@xxxxxxxxxxxxxxxxxxxx>
Cc: Jyri Sarha <jsarha@xxxxxx>
Cc: Tomi Valkeinen <tomi.valkeinen@xxxxxx>
---
 drivers/gpu/drm/tilcdc/tilcdc_panel.c | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/tilcdc/tilcdc_panel.c b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
index 12823d60c4e8..b6dd0a21fd0f 100644
--- a/drivers/gpu/drm/tilcdc/tilcdc_panel.c
+++ b/drivers/gpu/drm/tilcdc/tilcdc_panel.c
@@ -47,11 +47,10 @@ static void panel_encoder_dpms(struct drm_encoder *encoder, int mode)
 	struct backlight_device *backlight = panel_encoder->mod->backlight;
 	struct gpio_desc *gpio = panel_encoder->mod->enable_gpio;
 
-	if (backlight) {
-		backlight->props.power = mode == DRM_MODE_DPMS_ON ?
-					 FB_BLANK_UNBLANK : FB_BLANK_POWERDOWN;
-		backlight_update_status(backlight);
-	}
+	if (mode == DRM_MODE_DPMS_ON)
+		backlight_enable(backlight);
+	else
+		backlight_disable(backlight);
 
 	if (gpio)
 		gpiod_set_value_cansleep(gpio,
-- 
2.25.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel



[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux