]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Pass the level to intel_prepare_hdmi_ddi_buffers()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Mon, 16 Oct 2017 14:56:59 +0000 (17:56 +0300)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 19 Oct 2017 12:35:14 +0000 (15:35 +0300)
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: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20171016145705.11780-5-ville.syrjala@linux.intel.com
Reviewed-by: James Ausmus <james.ausmus@intel.com>
drivers/gpu/drm/i915/intel_ddi.c

index a021ebc72123c6163134f37f65f11b2b3567aead..fe0db435fa4717bcab7e7e93d656766b8e124f49 100644 (file)
@@ -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
  * 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);
        u32 iboost_bit = 0;
-       int n_hdmi_entries, hdmi_level;
+       int n_hdmi_entries;
        enum port port = intel_ddi_get_encoder_port(encoder);
        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);
 
        /* 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,
                bxt_ddi_vswing_sequence(dev_priv, level, port,
                                        INTEL_OUTPUT_HDMI);
        else
-               intel_prepare_hdmi_ddi_buffers(encoder);
+               intel_prepare_hdmi_ddi_buffers(encoder, level);
 
        if (IS_GEN9_BC(dev_priv))
                skl_ddi_set_iboost(encoder, level, INTEL_OUTPUT_HDMI);