struct drm_i915_private *dev_priv = dev->dev_private;
dev_priv->backlight_level = level;
+ if (dev_priv->backlight)
+ dev_priv->backlight->props.brightness = level;
+
if (dev_priv->backlight_enabled)
intel_panel_actually_set_backlight(dev, level);
}
{
struct drm_i915_private *dev_priv = dev->dev_private;
- if (dev_priv->backlight_level == 0)
+ if (dev_priv->backlight_level == 0) {
dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
+ if (dev_priv->backlight)
+ dev_priv->backlight->props.brightness =
+ dev_priv->backlight_level;
+ }
dev_priv->backlight_enabled = true;
intel_panel_actually_set_backlight(dev, dev_priv->backlight_level);
memset(&props, 0, sizeof(props));
props.type = BACKLIGHT_RAW;
+ props.brightness = dev_priv->backlight_level;
props.max_brightness = _intel_panel_get_max_backlight(dev);
if (props.max_brightness == 0) {
DRM_DEBUG_DRIVER("Failed to get maximum backlight value\n");
dev_priv->backlight = NULL;
return -ENODEV;
}
- dev_priv->backlight->props.brightness = intel_panel_get_backlight(dev);
return 0;
}