All of lore.kernel.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: intel-gfx@lists.freedesktop.org
Subject: [Intel-gfx] [PATCH 5/7] drm/i915: Split intel_ddi_encoder_reset() from intel_dp_encoder_reset()
Date: Thu, 14 Jan 2021 22:50:44 +0200	[thread overview]
Message-ID: <20210114205046.8247-6-ville.syrjala@linux.intel.com> (raw)
In-Reply-To: <20210114205046.8247-1-ville.syrjala@linux.intel.com>

From: Ville Syrjälä <ville.syrjala@linux.intel.com>

Most of intel_dp_encoder_reset() is for pre-ddi platforms.
Make a clean split.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 11 ++++++++++-
 drivers/gpu/drm/i915/display/intel_dp.c  |  5 ++---
 drivers/gpu/drm/i915/display/intel_dp.h  |  1 -
 3 files changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index d714e8b34d52..4443a4ab722f 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -5045,8 +5045,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,
 };
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 1df00c4980bf..30713816bf9d 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -6319,13 +6319,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;
 
diff --git a/drivers/gpu/drm/i915/display/intel_dp.h b/drivers/gpu/drm/i915/display/intel_dp.h
index 9508fa79d9be..6a2c759ad46f 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.h
+++ b/drivers/gpu/drm/i915/display/intel_dp.h
@@ -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);
-- 
2.26.2

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2021-01-14 20:51 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-01-14 20:50 [Intel-gfx] [PATCH 0/7] drm/i915: Shuffle DP code around Ville Syrjala
2021-01-14 20:50 ` [Intel-gfx] [PATCH 1/7] drm/i915: Fix the training pattern debug print Ville Syrjala
2021-01-14 20:50 ` [Intel-gfx] [PATCH 2/7] drm/i915: Remove dead TPS3->TPS2 fallback code Ville Syrjala
2021-01-14 20:50 ` [Intel-gfx] [PATCH 3/7] drm/i915: Remove dead signal level debugs Ville Syrjala
2021-01-14 20:50 ` [Intel-gfx] [PATCH 4/7] drm/i915: Relocate intel_dp_program_link_training_pattern() Ville Syrjala
2021-01-14 20:50 ` Ville Syrjala [this message]
2021-01-14 20:50 ` [Intel-gfx] [PATCH 6/7] drm/i915: Fix the PHY compliance test vs. hotplug mishap Ville Syrjala
2021-01-18 15:15   ` Imre Deak
2021-01-14 20:50 ` [Intel-gfx] [PATCH 7/7] drm/i915: Introduce g4x_dp.c Ville Syrjala
2021-01-14 22:13 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for drm/i915: Shuffle DP code around Patchwork
2021-01-14 22:44 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2021-01-15 10:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210114205046.8247-6-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.