diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_bios.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 4867f4cc0938..fa486c5fbb02 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -287,6 +287,9 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) | |||
287 | const struct bdb_lfp_backlight_data *backlight_data; | 287 | const struct bdb_lfp_backlight_data *backlight_data; |
288 | const struct bdb_lfp_backlight_data_entry *entry; | 288 | const struct bdb_lfp_backlight_data_entry *entry; |
289 | 289 | ||
290 | /* Err to enabling backlight if no backlight block. */ | ||
291 | dev_priv->vbt.backlight.present = true; | ||
292 | |||
290 | backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT); | 293 | backlight_data = find_section(bdb, BDB_LVDS_BACKLIGHT); |
291 | if (!backlight_data) | 294 | if (!backlight_data) |
292 | return; | 295 | return; |
@@ -299,6 +302,13 @@ parse_lfp_backlight(struct drm_i915_private *dev_priv, struct bdb_header *bdb) | |||
299 | 302 | ||
300 | entry = &backlight_data->data[panel_type]; | 303 | entry = &backlight_data->data[panel_type]; |
301 | 304 | ||
305 | dev_priv->vbt.backlight.present = entry->type == BDB_BACKLIGHT_TYPE_PWM; | ||
306 | if (!dev_priv->vbt.backlight.present) { | ||
307 | DRM_DEBUG_KMS("PWM backlight not present in VBT (type %u)\n", | ||
308 | entry->type); | ||
309 | return; | ||
310 | } | ||
311 | |||
302 | dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; | 312 | dev_priv->vbt.backlight.pwm_freq_hz = entry->pwm_freq_hz; |
303 | dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; | 313 | dev_priv->vbt.backlight.active_low_pwm = entry->active_low_pwm; |
304 | DRM_DEBUG_KMS("VBT backlight PWM modulation frequency %u Hz, " | 314 | DRM_DEBUG_KMS("VBT backlight PWM modulation frequency %u Hz, " |