diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 08:04:21 -0500 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 11:02:05 -0500 |
commit | 34957e8caae4e72614785ee9527042756cf74f53 (patch) | |
tree | fee204098450ec7cf7cd40ff30b594ea01537a22 /drivers/gpu/drm/i915 | |
parent | 98f3a1dcf8196c31786a2c0d5c57e42ebcd4abe0 (diff) |
drm/i915/bios: reduce indent in parse_general_features
Slightly cleaner with early exit.
Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450271061-32646-4-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915')
-rw-r--r-- | drivers/gpu/drm/i915/intel_bios.c | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c index 25edfc062f94..eba3e0f87181 100644 --- a/drivers/gpu/drm/i915/intel_bios.c +++ b/drivers/gpu/drm/i915/intel_bios.c | |||
@@ -353,25 +353,26 @@ parse_general_features(struct drm_i915_private *dev_priv, | |||
353 | const struct bdb_general_features *general; | 353 | const struct bdb_general_features *general; |
354 | 354 | ||
355 | general = find_section(bdb, BDB_GENERAL_FEATURES); | 355 | general = find_section(bdb, BDB_GENERAL_FEATURES); |
356 | if (general) { | 356 | if (!general) |
357 | dev_priv->vbt.int_tv_support = general->int_tv_support; | 357 | return; |
358 | /* int_crt_support can't be trusted on earlier platforms */ | 358 | |
359 | if (bdb->version >= 155 && | 359 | dev_priv->vbt.int_tv_support = general->int_tv_support; |
360 | (HAS_DDI(dev_priv) || IS_VALLEYVIEW(dev_priv))) | 360 | /* int_crt_support can't be trusted on earlier platforms */ |
361 | dev_priv->vbt.int_crt_support = general->int_crt_support; | 361 | if (bdb->version >= 155 && |
362 | dev_priv->vbt.lvds_use_ssc = general->enable_ssc; | 362 | (HAS_DDI(dev_priv) || IS_VALLEYVIEW(dev_priv))) |
363 | dev_priv->vbt.lvds_ssc_freq = | 363 | dev_priv->vbt.int_crt_support = general->int_crt_support; |
364 | intel_bios_ssc_frequency(dev_priv, general->ssc_freq); | 364 | dev_priv->vbt.lvds_use_ssc = general->enable_ssc; |
365 | dev_priv->vbt.display_clock_mode = general->display_clock_mode; | 365 | dev_priv->vbt.lvds_ssc_freq = |
366 | dev_priv->vbt.fdi_rx_polarity_inverted = general->fdi_rx_polarity_inverted; | 366 | intel_bios_ssc_frequency(dev_priv, general->ssc_freq); |
367 | DRM_DEBUG_KMS("BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n", | 367 | dev_priv->vbt.display_clock_mode = general->display_clock_mode; |
368 | dev_priv->vbt.int_tv_support, | 368 | dev_priv->vbt.fdi_rx_polarity_inverted = general->fdi_rx_polarity_inverted; |
369 | dev_priv->vbt.int_crt_support, | 369 | DRM_DEBUG_KMS("BDB_GENERAL_FEATURES int_tv_support %d int_crt_support %d lvds_use_ssc %d lvds_ssc_freq %d display_clock_mode %d fdi_rx_polarity_inverted %d\n", |
370 | dev_priv->vbt.lvds_use_ssc, | 370 | dev_priv->vbt.int_tv_support, |
371 | dev_priv->vbt.lvds_ssc_freq, | 371 | dev_priv->vbt.int_crt_support, |
372 | dev_priv->vbt.display_clock_mode, | 372 | dev_priv->vbt.lvds_use_ssc, |
373 | dev_priv->vbt.fdi_rx_polarity_inverted); | 373 | dev_priv->vbt.lvds_ssc_freq, |
374 | } | 374 | dev_priv->vbt.display_clock_mode, |
375 | dev_priv->vbt.fdi_rx_polarity_inverted); | ||
375 | } | 376 | } |
376 | 377 | ||
377 | static void | 378 | static void |