]> git.baikalelectronics.ru Git - kernel.git/commitdiff
drm/i915: Split intel_ddi_encoder_reset() from intel_dp_encoder_reset()
authorVille Syrjälä <ville.syrjala@linux.intel.com>
Thu, 18 Mar 2021 16:10:12 +0000 (18:10 +0200)
committerVille Syrjälä <ville.syrjala@linux.intel.com>
Fri, 19 Mar 2021 16:31:07 +0000 (18:31 +0200)
Most of intel_dp_encoder_reset() is for pre-ddi platforms.
Make a clean split.

Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20210318161015.22070-5-ville.syrjala@linux.intel.com
drivers/gpu/drm/i915/display/intel_ddi.c
drivers/gpu/drm/i915/display/intel_dp.c
drivers/gpu/drm/i915/display/intel_dp.h

index 75655f47f26c3b4389f1cfe64be81b6f85bdc620..6438e102ad1e94be3e007d77f1af739cda433d71 100644 (file)
@@ -4017,8 +4017,17 @@ static void intel_ddi_encoder_destroy(struct drm_encoder *encoder)
        kfree(dig_port);
 }
 
+static void intel_ddi_encoder_reset(struct drm_encoder *encoder)
+{
+       struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder));
+
+       intel_dp->reset_link_params = true;
+
+       intel_pps_encoder_reset(intel_dp);
+}
+
 static const struct drm_encoder_funcs intel_ddi_funcs = {
-       .reset = intel_dp_encoder_reset,
+       .reset = intel_ddi_encoder_reset,
        .destroy = intel_ddi_encoder_destroy,
 };
 
index 34c0dbdad0de78243ccf602cd88c250773d87b49..07fbfa7ea9152c370b61ac1a234d1083af84877a 100644 (file)
@@ -5736,13 +5736,12 @@ static enum pipe vlv_active_pipe(struct intel_dp *intel_dp)
        return INVALID_PIPE;
 }
 
-void intel_dp_encoder_reset(struct drm_encoder *encoder)
+static void intel_dp_encoder_reset(struct drm_encoder *encoder)
 {
        struct drm_i915_private *dev_priv = to_i915(encoder->dev);
        struct intel_dp *intel_dp = enc_to_intel_dp(to_intel_encoder(encoder));
 
-       if (!HAS_DDI(dev_priv))
-               intel_dp->DP = intel_de_read(dev_priv, intel_dp->output_reg);
+       intel_dp->DP = intel_de_read(dev_priv, intel_dp->output_reg);
 
        intel_dp->reset_link_params = true;
 
index d673cba16835e3d0fac5b4c6da041a040edf8864..e4a71c19bd51a9eee34d8c5496276ab8cddb7d56 100644 (file)
@@ -56,7 +56,6 @@ void intel_dp_configure_protocol_converter(struct intel_dp *intel_dp,
 void intel_dp_sink_set_decompression_state(struct intel_dp *intel_dp,
                                           const struct intel_crtc_state *crtc_state,
                                           bool enable);
-void intel_dp_encoder_reset(struct drm_encoder *encoder);
 void intel_dp_encoder_suspend(struct intel_encoder *intel_encoder);
 void intel_dp_encoder_shutdown(struct intel_encoder *intel_encoder);
 void intel_dp_encoder_flush_work(struct drm_encoder *encoder);