[PATCH 5/6] i915: Use drm backlight

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

 



Use the drm backlight class.

Signed-off-by: Marta Lofstedt <marta.lofstedt@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_panel.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index be4b4d5..0765b4c 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -34,6 +34,7 @@
 #include <linux/moduleparam.h>
 #include <linux/pwm.h>
 #include "intel_drv.h"
+#include <drm/drm_backlight.h>
 
 #define CRC_PMIC_PWM_PERIOD_NS	21333
 
@@ -1720,6 +1721,10 @@ int intel_panel_setup_backlight(struct drm_connector *connector, enum pipe pipe)
 
 	panel->backlight.present = true;
 
+	/* This connector has backlight attached */
+	if (!drm_backlight_alloc(connector))
+	        drm_backlight_set_name(connector->backlight, "intel_backlight");
+
 	DRM_DEBUG_KMS("Connector %s backlight initialized, %s, brightness %u/%u\n",
 		      connector->name,
 		      panel->backlight.enabled ? "enabled" : "disabled",
-- 
2.9.3

_______________________________________________
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