drm/i915: extract backlight minimum brightness from VBT
authorJani Nikula <jani.nikula@intel.com>
Tue, 24 Jun 2014 15:27:39 +0000 (18:27 +0300)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Wed, 23 Jul 2014 05:05:56 +0000 (07:05 +0200)
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.h
drivers/gpu/drm/i915/intel_bios.c

index 30b23bf7df284570eb9dc324ec8111d262749561..12ab3201ee1ee28d956f2d3fe19e6f43611d0550 100644 (file)
@@ -1270,6 +1270,7 @@ struct intel_vbt_data {
                u16 pwm_freq_hz;
                bool present;
                bool active_low_pwm;
+               u8 min_brightness;      /* min_brightness/255 of max */
        } backlight;
 
        /* MIPI DSI */
index 827498e081df545df16ecbe308f93210ae05582c..608ed302f24df7da14a4b1a962bd63007b884adc 100644 (file)
@@ -336,11 +336,12 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb)
 
        dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz;
        dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm;
+       dev_priv->vbt.backlight.min_brightness = entry->min_brightness;
        DRM_DEBUG_KMS("VBT backlight PWM modulation frequency %u Hz, "
                      "active %s, min brightness %u, level %u\n",
                      dev_priv->vbt.backlight.pwm_freq_hz,
                      dev_priv->vbt.backlight.active_low_pwm ? "low" : "high",
-                     entry->min_brightness,
+                     dev_priv->vbt.backlight.min_brightness,
                      backlight_data->level[panel_type]);
 }