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>
This commit is contained in:
Jesse Barnes 2013-04-19 08:46:35 -07:00 коммит произвёл Daniel Vetter
Родитель bf98a72650
Коммит cece5d58d5
1 изменённых файлов: 1 добавлений и 8 удалений

Просмотреть файл

@ -1595,14 +1595,7 @@ static uint32_t intel_vlv_signal_levels(struct intel_dp *intel_dp)
unsigned long demph_reg_value, preemph_reg_value, unsigned long demph_reg_value, preemph_reg_value,
uniqtranscale_reg_value; uniqtranscale_reg_value;
uint8_t train_set = intel_dp->train_set[0]; uint8_t train_set = intel_dp->train_set[0];
int port; int port = vlv_dport_to_channel(dport);
if (dport->port == PORT_B)
port = 0;
else if (dport->port == PORT_C)
port = 1;
else
BUG();
WARN_ON(!mutex_is_locked(&dev_priv->dpio_lock)); WARN_ON(!mutex_is_locked(&dev_priv->dpio_lock));