Commit 1b6e2fd2 authored by Rodrigo Vivi's avatar Rodrigo Vivi

drm/i915: Introduce intel_ddi_dp_level.

No functional changes. This only moves the DP level
selection to a separated function that will be later
used to organize better the vswing sequences.

Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Signed-off-by: default avatarRodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-1-rodrigo.vivi@intel.com
parent 385db982
...@@ -2054,18 +2054,22 @@ static uint32_t translate_signal_level(int signal_levels) ...@@ -2054,18 +2054,22 @@ static uint32_t translate_signal_level(int signal_levels)
return 0; return 0;
} }
static uint32_t intel_ddi_dp_level(struct intel_dp *intel_dp)
{
uint8_t train_set = intel_dp->train_set[0];
int signal_levels = train_set & (DP_TRAIN_VOLTAGE_SWING_MASK |
DP_TRAIN_PRE_EMPHASIS_MASK);
return translate_signal_level(signal_levels);
}
uint32_t ddi_signal_levels(struct intel_dp *intel_dp) uint32_t ddi_signal_levels(struct intel_dp *intel_dp)
{ {
struct intel_digital_port *dport = dp_to_dig_port(intel_dp); struct intel_digital_port *dport = dp_to_dig_port(intel_dp);
struct drm_i915_private *dev_priv = to_i915(dport->base.base.dev); struct drm_i915_private *dev_priv = to_i915(dport->base.base.dev);
struct intel_encoder *encoder = &dport->base; struct intel_encoder *encoder = &dport->base;
uint8_t train_set = intel_dp->train_set[0];
int signal_levels = train_set & (DP_TRAIN_VOLTAGE_SWING_MASK |
DP_TRAIN_PRE_EMPHASIS_MASK);
enum port port = dport->port; enum port port = dport->port;
uint32_t level; uint32_t level = intel_ddi_dp_level(intel_dp);
level = translate_signal_level(signal_levels);
if (IS_GEN9_BC(dev_priv)) if (IS_GEN9_BC(dev_priv))
skl_ddi_set_iboost(encoder, level); skl_ddi_set_iboost(encoder, level);
......
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