Commit ec990e21 authored by Jani Nikula's avatar Jani Nikula

drm/i915/dp: localize link rate index variable more

Localize link_rate_index to the if block, and rename to just index to
reduce indent.

Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: default avatarManasi Navare <manasi.d.navare@intel.com>
Signed-off-by: default avatarJani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/d348d990c96705427b93c1cac8c3e4447d06eebf.1491485983.git.jani.nikula@intel.com
parent 3d65a735
...@@ -1636,7 +1636,6 @@ intel_dp_compute_config(struct intel_encoder *encoder, ...@@ -1636,7 +1636,6 @@ intel_dp_compute_config(struct intel_encoder *encoder,
/* Conveniently, the link BW constants become indices with a shift...*/ /* Conveniently, the link BW constants become indices with a shift...*/
int min_clock = 0; int min_clock = 0;
int max_clock; int max_clock;
int link_rate_index;
int bpp, mode_rate; int bpp, mode_rate;
int link_avail, link_clock; int link_avail, link_clock;
int common_len; int common_len;
...@@ -1680,11 +1679,13 @@ intel_dp_compute_config(struct intel_encoder *encoder, ...@@ -1680,11 +1679,13 @@ intel_dp_compute_config(struct intel_encoder *encoder,
/* Use values requested by Compliance Test Request */ /* Use values requested by Compliance Test Request */
if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) { if (intel_dp->compliance.test_type == DP_TEST_LINK_TRAINING) {
link_rate_index = intel_dp_rate_index(intel_dp->common_rates, int index;
index = intel_dp_rate_index(intel_dp->common_rates,
intel_dp->num_common_rates, intel_dp->num_common_rates,
intel_dp->compliance.test_link_rate); intel_dp->compliance.test_link_rate);
if (link_rate_index >= 0) if (index >= 0)
min_clock = max_clock = link_rate_index; min_clock = max_clock = index;
min_lane_count = max_lane_count = intel_dp->compliance.test_lane_count; min_lane_count = max_lane_count = intel_dp->compliance.test_lane_count;
} }
DRM_DEBUG_KMS("DP link computation with max lane count %i " DRM_DEBUG_KMS("DP link computation with max lane count %i "
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment