Skip to contentSkip to conversation

drm/i915: use vlv_dport_to_channel in vlv_signal_levels

PATCH Applied Jesse Barnes 2 participants 2 messages Apr 19, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/i915: use vlv_dport_to_channel in vlv_signal_levels

Minor cleanup. Would be nice to use an enum for channel in the DPIO macros so we don't mix up pipes and channels, but that's for another patch.

---
 drivers/gpu/drm/i915/intel_dp.c |    9 +--------
 1 file changed, 1 insertion(+), 8 deletions(-)
drivers/gpu/drm/i915/intel_dp.c +1 -8
index 1515c24..f49cb21 100644
@@ -1598,14 +1598,7 @@ static uint32_t intel_vlv_signal_levels(struct intel_dp *intel_dp)
 	unsigned long demph_reg_value, preemph_reg_value,
 		uniqtranscale_reg_value;
 	uint8_t train_set = intel_dp->train_set[0];
-	int port;
-
-	if (dport->port == PORT_B)
-		port = 0;
-	else if (dport->port == PORT_C)
-		port = 1;
-	else
-		BUG();
+	int port = vlv_dport_to_channel(dport);
 
 	WARN_ON(!mutex_is_locked(&dev_priv->dpio_lock));
 
Signature · 1 line
1.7.10.4
#1 lore raw
Quoted 5 lines · Jesse Barnes

Minor cleanup. Would be nice to use an enum for channel in the DPIO macros so we don't mix up pipes and channels, but that's for another patch.

Queued for -next, thanks for the patch.
-Daniel

Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch