diff options
author | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-08-29 16:22:23 -0700 |
---|---|---|
committer | Rodrigo Vivi <rodrigo.vivi@intel.com> | 2017-08-31 09:30:05 -0700 |
commit | 1b6e2fd2896a707ccb480939d127c621308d403e (patch) | |
tree | 8fd0ca234a9d4121fed5b29af2f7e201513aabd8 | |
parent | 385db982b277a1eb5998b6316a500a2d6d9592b1 (diff) | |
download | linux-1b6e2fd2896a707ccb480939d127c621308d403e.tar.gz linux-1b6e2fd2896a707ccb480939d127c621308d403e.tar.bz2 linux-1b6e2fd2896a707ccb480939d127c621308d403e.zip |
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: Rodrigo Vivi <rodrigo.vivi@intel.com>
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20170829232230.23051-1-rodrigo.vivi@intel.com
-rw-r--r-- | drivers/gpu/drm/i915/intel_ddi.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/drivers/gpu/drm/i915/intel_ddi.c b/drivers/gpu/drm/i915/intel_ddi.c index 0a316a6ccb50..7e875e05d053 100644 --- a/drivers/gpu/drm/i915/intel_ddi.c +++ b/drivers/gpu/drm/i915/intel_ddi.c @@ -2054,18 +2054,22 @@ static uint32_t translate_signal_level(int signal_levels) 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) { struct intel_digital_port *dport = dp_to_dig_port(intel_dp); struct drm_i915_private *dev_priv = to_i915(dport->base.base.dev); 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; - uint32_t level; - - level = translate_signal_level(signal_levels); + uint32_t level = intel_ddi_dp_level(intel_dp); if (IS_GEN9_BC(dev_priv)) skl_ddi_set_iboost(encoder, level); |