aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJani Nikula <jani.nikula@intel.com>2018-04-11 09:15:19 -0400
committerJani Nikula <jani.nikula@intel.com>2018-04-12 04:22:46 -0400
commite53a1058395435b8801591361b2be18adda869ff (patch)
treef42ffa310ffcfc50c2086de3fb2d52c2d8bc038e
parentf212bf9abe5de9f938fecea7df07046e74052dde (diff)
drm/i915/bios: reduce the scope of some local variables in parse_ddi_port()
No functional changes. Cc: Chris Wilson <chris@chris-wilson.co.uk> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Jani Nikula <jani.nikula@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20180411131519.9091-2-jani.nikula@intel.com
-rw-r--r--drivers/gpu/drm/i915/intel_bios.c10
1 files changed, 4 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_bios.c b/drivers/gpu/drm/i915/intel_bios.c
index 0f25cecb942f..702d3fab97fc 100644
--- a/drivers/gpu/drm/i915/intel_bios.c
+++ b/drivers/gpu/drm/i915/intel_bios.c
@@ -1215,10 +1215,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1215{ 1215{
1216 struct child_device_config *it, *child = NULL; 1216 struct child_device_config *it, *child = NULL;
1217 struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port]; 1217 struct ddi_vbt_port_info *info = &dev_priv->vbt.ddi_port_info[port];
1218 uint8_t hdmi_level_shift;
1219 int i, j; 1218 int i, j;
1220 bool is_dvi, is_hdmi, is_dp, is_edp, is_crt; 1219 bool is_dvi, is_hdmi, is_dp, is_edp, is_crt;
1221 uint8_t aux_channel, ddc_pin;
1222 /* Each DDI port can have more than one value on the "DVO Port" field, 1220 /* Each DDI port can have more than one value on the "DVO Port" field,
1223 * so look for all the possible values for each port. 1221 * so look for all the possible values for each port.
1224 */ 1222 */
@@ -1255,8 +1253,6 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1255 if (!child) 1253 if (!child)
1256 return; 1254 return;
1257 1255
1258 aux_channel = child->aux_channel;
1259
1260 is_dvi = child->device_type & DEVICE_TYPE_TMDS_DVI_SIGNALING; 1256 is_dvi = child->device_type & DEVICE_TYPE_TMDS_DVI_SIGNALING;
1261 is_dp = child->device_type & DEVICE_TYPE_DISPLAYPORT_OUTPUT; 1257 is_dp = child->device_type & DEVICE_TYPE_DISPLAYPORT_OUTPUT;
1262 is_crt = child->device_type & DEVICE_TYPE_ANALOG_OUTPUT; 1258 is_crt = child->device_type & DEVICE_TYPE_ANALOG_OUTPUT;
@@ -1295,6 +1291,8 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1295 DRM_DEBUG_KMS("Port %c is internal DP\n", port_name(port)); 1291 DRM_DEBUG_KMS("Port %c is internal DP\n", port_name(port));
1296 1292
1297 if (is_dvi) { 1293 if (is_dvi) {
1294 u8 ddc_pin;
1295
1298 ddc_pin = map_ddc_pin(dev_priv, child->ddc_pin); 1296 ddc_pin = map_ddc_pin(dev_priv, child->ddc_pin);
1299 if (intel_gmbus_is_valid_pin(dev_priv, ddc_pin)) { 1297 if (intel_gmbus_is_valid_pin(dev_priv, ddc_pin)) {
1300 info->alternate_ddc_pin = ddc_pin; 1298 info->alternate_ddc_pin = ddc_pin;
@@ -1307,14 +1305,14 @@ static void parse_ddi_port(struct drm_i915_private *dev_priv, enum port port,
1307 } 1305 }
1308 1306
1309 if (is_dp) { 1307 if (is_dp) {
1310 info->alternate_aux_channel = aux_channel; 1308 info->alternate_aux_channel = child->aux_channel;
1311 1309
1312 sanitize_aux_ch(dev_priv, port); 1310 sanitize_aux_ch(dev_priv, port);
1313 } 1311 }
1314 1312
1315 if (bdb_version >= 158) { 1313 if (bdb_version >= 158) {
1316 /* The VBT HDMI level shift values match the table we have. */ 1314 /* The VBT HDMI level shift values match the table we have. */
1317 hdmi_level_shift = child->hdmi_level_shifter_value; 1315 u8 hdmi_level_shift = child->hdmi_level_shifter_value;
1318 DRM_DEBUG_KMS("VBT HDMI level shift for port %c: %d\n", 1316 DRM_DEBUG_KMS("VBT HDMI level shift for port %c: %d\n",
1319 port_name(port), 1317 port_name(port),
1320 hdmi_level_shift); 1318 hdmi_level_shift);