]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/i915/panel: The backlight is enabled if the current value is non-zero
authorIndan Zupancic <indan@nul.nu>
Wed, 12 Jan 2011 11:59:19 +0000 (11:59 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Wed, 12 Jan 2011 20:24:50 +0000 (20:24 +0000)
... and not if the maximum is non-zero. This fixes the typo introduced
in 47356eb6728501452 and preserves the backlight value from boot.

[ickle: My thanks also to Indan Zupancic for diagnosing the original
        regression and suggesting the appropriate fix.]
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org # after 47356eb6728501452
drivers/gpu/drm/i915/intel_panel.c

index e00d200df3db1fe2b4dd7c2f2c8789003e58fc86..c65992df458d6a905c1bab7dcb38f38d9dfeab49 100644 (file)
@@ -278,6 +278,6 @@ void intel_panel_setup_backlight(struct drm_device *dev)
 {
        struct drm_i915_private *dev_priv = dev->dev_private;
 
-       dev_priv->backlight_level = intel_panel_get_max_backlight(dev);
+       dev_priv->backlight_level = intel_panel_get_backlight(dev);
        dev_priv->backlight_enabled = dev_priv->backlight_level != 0;
 }