blob: b4a41a756338096b4d455d9fa41450998fa3b7fb [file] [log] [blame]
From 39c407ed1c6b7da0c806c98c21964cc1bd4f8230 Mon Sep 17 00:00:00 2001
From: Jesse Barnes <jbarnes@virtuousgeek.org>
Date: Fri, 19 Apr 2013 08:46:35 -0700
Subject: 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.
Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
(cherry picked from commit cece5d58d5568e4a7986e43981d21a80ea189a82)
Signed-off-by: Darren Hart <dvhart@linux.intel.com>
---
drivers/gpu/drm/i915/intel_dp.c | 9 +--------
1 file changed, 1 insertion(+), 8 deletions(-)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 415caad2b10f..d8407c9b0504 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1597,14 +1597,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));
--
1.8.5.rc3