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