Commit 7ea79333 authored by Ville Syrjälä's avatar Ville Syrjälä

drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()

The caller of intel_prepare_hdmi_ddi_buffers() alreday figured out the
level, so let's just pass it in instead if figuring it out again.
Signed-off-by: default avatarVille Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-5-ville.syrjala@linux.intel.comReviewed-by: default avatarJames Ausmus <james.ausmus@intel.com>
parent 081dfcfa
...@@ -817,16 +817,15 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder) ...@@ -817,16 +817,15 @@ static void intel_prepare_dp_ddi_buffers(struct intel_encoder *encoder)
* values in advance. This function programs the correct values for * values in advance. This function programs the correct values for
* HDMI/DVI use cases. * HDMI/DVI use cases.
*/ */
static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder) static void intel_prepare_hdmi_ddi_buffers(struct intel_encoder *encoder,
int hdmi_level)
{ {
struct drm_i915_private *dev_priv = to_i915(encoder->base.dev); struct drm_i915_private *dev_priv = to_i915(encoder->base.dev);
u32 iboost_bit = 0; u32 iboost_bit = 0;
int n_hdmi_entries, hdmi_level; int n_hdmi_entries;
enum port port = intel_ddi_get_encoder_port(encoder); enum port port = intel_ddi_get_encoder_port(encoder);
const struct ddi_buf_trans *ddi_translations_hdmi; const struct ddi_buf_trans *ddi_translations_hdmi;
hdmi_level = intel_ddi_hdmi_level(dev_priv, port);
ddi_translations_hdmi = intel_ddi_get_buf_trans_hdmi(dev_priv, &n_hdmi_entries); ddi_translations_hdmi = intel_ddi_get_buf_trans_hdmi(dev_priv, &n_hdmi_entries);
/* If we're boosting the current, set bit 31 of trans1 */ /* If we're boosting the current, set bit 31 of trans1 */
...@@ -2202,7 +2201,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder, ...@@ -2202,7 +2201,7 @@ static void intel_ddi_pre_enable_hdmi(struct intel_encoder *encoder,
bxt_ddi_vswing_sequence(dev_priv, level, port, bxt_ddi_vswing_sequence(dev_priv, level, port,
INTEL_OUTPUT_HDMI); INTEL_OUTPUT_HDMI);
else else
intel_prepare_hdmi_ddi_buffers(encoder); intel_prepare_hdmi_ddi_buffers(encoder, level);
if (IS_GEN9_BC(dev_priv)) if (IS_GEN9_BC(dev_priv))
skl_ddi_set_iboost(encoder, level, INTEL_OUTPUT_HDMI); skl_ddi_set_iboost(encoder, level, INTEL_OUTPUT_HDMI);
......
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