public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@intel.com>
Subject: [PATCH v2 4/5] drm/i915/adlp+/dp_mst: Align slave transcoder sequences with spec wrt. DP2 config
Date: Wed, 30 Oct 2024 21:23:12 +0200	[thread overview]
Message-ID: <20241030192313.4030617-5-imre.deak@intel.com> (raw)
In-Reply-To: <20241030192313.4030617-1-imre.deak@intel.com>

On ADLP+ during modeset enabling and disabling, enable and disable the DP2
configuration for MST slave transcoders as required by the specification.

Update the documentation of intel_ddi_config_transcoder_func() /
intel_ddi_disable_transcoder_func() based on the above. While at it also
clarify the programming steps of these functions specific to transcoder
types.

v2:
- Enable/disable the DP2 config from
  intel_ddi_config_transcoder_func()/intel_ddi_disable_transcoder_func().
  (Jani)
- Handle all ADLP+ platforms in one patch, instead of doing that
  separately wrt. PTL.

Bspec: 55424, 54128, 65448, 68849
Cc: Jani Nikula <jani.nikula@intel.com>
Signed-off-by: Imre Deak <imre.deak@intel.com>
---
 drivers/gpu/drm/i915/display/intel_ddi.c | 20 +++++++++++++-------
 1 file changed, 13 insertions(+), 7 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_ddi.c b/drivers/gpu/drm/i915/display/intel_ddi.c
index dcd43087fa7ed..d82bc1bf8b68f 100644
--- a/drivers/gpu/drm/i915/display/intel_ddi.c
+++ b/drivers/gpu/drm/i915/display/intel_ddi.c
@@ -621,7 +621,8 @@ void intel_ddi_enable_transcoder_func(struct intel_encoder *encoder,
 
 /*
  * Same as intel_ddi_enable_transcoder_func(), but it does not set the enable
- * bit.
+ * bit for the DDI function and enables the DP2 configuration. Called for all
+ * transcoder types.
  */
 void
 intel_ddi_config_transcoder_func(struct intel_encoder *encoder,
@@ -632,12 +633,20 @@ intel_ddi_config_transcoder_func(struct intel_encoder *encoder,
 	enum transcoder cpu_transcoder = crtc_state->cpu_transcoder;
 	u32 ctl;
 
+	intel_ddi_config_transcoder_dp2(crtc_state, true);
+
 	ctl = intel_ddi_transcoder_func_reg_val_get(encoder, crtc_state);
 	ctl &= ~TRANS_DDI_FUNC_ENABLE;
 	intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(dev_priv, cpu_transcoder),
 		       ctl);
 }
 
+/*
+ * Disable the DDI function and port syncing.
+ * For SST, pre-TGL MST, TGL+ MST-slave transcoders: deselect the DDI port,
+ * SST/MST mode and disable the DP2 configuration. For TGL+ MST-master
+ * transcoders these are done later in intel_ddi_post_disable_dp().
+ */
 void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state)
 {
 	struct intel_display *display = to_intel_display(crtc_state);
@@ -674,6 +683,9 @@ void intel_ddi_disable_transcoder_func(const struct intel_crtc_state *crtc_state
 	intel_de_write(dev_priv, TRANS_DDI_FUNC_CTL(dev_priv, cpu_transcoder),
 		       ctl);
 
+	if (intel_dp_mst_is_slave_trans(crtc_state))
+		intel_ddi_config_transcoder_dp2(crtc_state, false);
+
 	if (intel_has_quirk(display, QUIRK_INCREASE_DDI_DISABLED_TIME) &&
 	    intel_crtc_has_type(crtc_state, INTEL_OUTPUT_HDMI)) {
 		drm_dbg_kms(display->drm, "Quirk Increase DDI disabled time\n");
@@ -2552,10 +2564,6 @@ static void mtl_ddi_pre_enable_dp(struct intel_atomic_state *state,
 
 	/*
 	 * 6.b If DP v2.0/128b mode - Configure TRANS_DP2_CTL register settings.
-	 */
-	intel_ddi_config_transcoder_dp2(crtc_state, true);
-
-	/*
 	 * 6.c Configure TRANS_DDI_FUNC_CTL DDI Select, DDI Mode Select & MST
 	 * Transport Select
 	 */
@@ -2690,8 +2698,6 @@ static void tgl_ddi_pre_enable_dp(struct intel_atomic_state *state,
 	 */
 	intel_ddi_enable_transcoder_clock(encoder, crtc_state);
 
-	intel_ddi_config_transcoder_dp2(crtc_state, true);
-
 	/*
 	 * 7.b Configure TRANS_DDI_FUNC_CTL DDI Select, DDI Mode Select & MST
 	 * Transport Select
-- 
2.44.2


  parent reply	other threads:[~2024-10-30 19:23 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-30 19:23 [PATCH v2 0/5] drm/dp_mst: Fix DDI function/DP2 config programming Imre Deak
2024-10-30 19:23 ` [PATCH v2 1/5] drm/i915/ptl/dp_mst: Fix slave transcoder enabling wrt. DDI function Imre Deak
2024-10-31 10:44   ` Luca Coelho
2024-10-31 10:57     ` Imre Deak
2024-10-31 10:59       ` Luca Coelho
2024-10-30 19:23 ` [PATCH v2 2/5] drm/i915/adlp+/dp_mst: Align slave transcoder enabling with spec " Imre Deak
2024-10-31 10:49   ` Luca Coelho
2024-10-31 11:40     ` Imre Deak
2024-11-06 12:38       ` Luca Coelho
2024-10-30 19:23 ` [PATCH v2 3/5] drm/i915/dp_mst: Add a way to disable the DP2 config Imre Deak
2024-10-31 10:52   ` Luca Coelho
2024-10-31 12:36   ` Jani Nikula
2024-10-31 12:42     ` Imre Deak
2024-10-30 19:23 ` Imre Deak [this message]
2024-10-31 10:54   ` [PATCH v2 4/5] drm/i915/adlp+/dp_mst: Align slave transcoder sequences with spec wrt. " Luca Coelho
2024-10-30 19:23 ` [PATCH v2 5/5] drm/i915/adlp+/dp_mst: Align master transcoder disabling " Imre Deak
2024-10-31 10:56   ` Luca Coelho
2024-10-31 11:03     ` Imre Deak
2024-10-30 19:50 ` ✗ Fi.CI.SPARSE: warning for drm/dp_mst: Fix DDI function/DP2 config programming Patchwork
2024-10-30 21:24 ` ✗ Fi.CI.BAT: failure " Patchwork
2024-10-30 21:47   ` Imre Deak
2024-11-04 10:50     ` Illipilli, TejasreeX
2024-11-04 10:41 ` ✓ Fi.CI.BAT: success " Patchwork
2024-11-04 16:24 ` ✗ Fi.CI.IGT: failure " Patchwork
2024-11-06 16:29   ` Imre Deak

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=20241030192313.4030617-5-imre.deak@intel.com \
    --to=imre.deak@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jani.nikula@intel.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox