All of lore.kernel.org
 help / color / mirror / Atom feed
From: Imre Deak <imre.deak@intel.com>
To: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: <intel-gfx@lists.freedesktop.org>,
	<intel-xe@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>
Subject: Re: [PATCH 7/9] drm/i915/dp: Implement .set_idle_link_train() for everyone
Date: Mon, 16 Jun 2025 19:31:55 +0300	[thread overview]
Message-ID: <aFBG-5BOfl4lBLou@ideak-desk> (raw)
In-Reply-To: <20250224172645.15763-8-ville.syrjala@linux.intel.com>

On Mon, Feb 24, 2025 at 07:26:43PM +0200, Ville Syrjala wrote:
> From: Ville Syrjälä <ville.syrjala@linux.intel.com>
> 
> All platforms are capable of explicitly transmitting the idle
> pattern. Implement it for everyone (so far it as implemented
                                                ^was
> only for HSW+).
> 
> The immediate benefit is that we gain support for the
> POST_LT_ADJ_REQ sequence for all platforms.
> 
> Another potential future use would be a pseudo port sync mode on
> pre-BDW where we attempt to sync up multiple ports/pipes by trying
> to turn on the transcoders at the same time, and switching the
> links to normal pixel transmission at the same time.
> 
> Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/display/g4x_dp.c | 33 +++++++++++++++++++++++++--
>  1 file changed, 31 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/g4x_dp.c b/drivers/gpu/drm/i915/display/g4x_dp.c
> index 372c3683c193..390f9b476a11 100644
> --- a/drivers/gpu/drm/i915/display/g4x_dp.c
> +++ b/drivers/gpu/drm/i915/display/g4x_dp.c
> @@ -621,6 +621,19 @@ cpt_set_link_train(struct intel_dp *intel_dp,
>  	intel_de_posting_read(display, intel_dp->output_reg);
>  }
>  
> +static void
> +cpt_set_idle_link_train(struct intel_dp *intel_dp,
> +			const struct intel_crtc_state *crtc_state)
> +{
> +	struct intel_display *display = to_intel_display(intel_dp);
> +
> +	intel_dp->DP &= ~DP_LINK_TRAIN_MASK_CPT;
> +	intel_dp->DP |= DP_LINK_TRAIN_PAT_IDLE_CPT;
> +
> +	intel_de_write(display, intel_dp->output_reg, intel_dp->DP);
> +	intel_de_posting_read(display, intel_dp->output_reg);
> +}
> +
>  static void
>  g4x_set_link_train(struct intel_dp *intel_dp,
>  		   const struct intel_crtc_state *crtc_state,
> @@ -649,6 +662,19 @@ g4x_set_link_train(struct intel_dp *intel_dp,
>  	intel_de_posting_read(display, intel_dp->output_reg);
>  }
>  
> +static void
> +g4x_set_idle_link_train(struct intel_dp *intel_dp,
> +			const struct intel_crtc_state *crtc_state)
> +{
> +	struct intel_display *display = to_intel_display(intel_dp);
> +
> +	intel_dp->DP &= ~DP_LINK_TRAIN_MASK;
> +	intel_dp->DP |= DP_LINK_TRAIN_PAT_IDLE;
> +
> +	intel_de_write(display, intel_dp->output_reg, intel_dp->DP);
> +	intel_de_posting_read(display, intel_dp->output_reg);
> +}

AFAICS the above could be also used in intel_dp_link_down().

> +
>  static void intel_dp_enable_port(struct intel_dp *intel_dp,
>  				 const struct intel_crtc_state *crtc_state)
>  {
> @@ -1353,10 +1379,13 @@ bool g4x_dp_init(struct intel_display *display,
>  	intel_encoder->audio_disable = g4x_dp_audio_disable;
>  
>  	if ((display->platform.ivybridge && port == PORT_A) ||
> -	    (HAS_PCH_CPT(dev_priv) && port != PORT_A))
> +	    (HAS_PCH_CPT(dev_priv) && port != PORT_A)) {
>  		dig_port->dp.set_link_train = cpt_set_link_train;
> -	else
> +		dig_port->dp.set_idle_link_train = cpt_set_idle_link_train;
> +	} else {
>  		dig_port->dp.set_link_train = g4x_set_link_train;
> +		dig_port->dp.set_idle_link_train = g4x_set_idle_link_train;
> +	}
>  
>  	if (display->platform.cherryview)
>  		intel_encoder->set_signal_levels = chv_set_signal_levels;
> -- 
> 2.45.3
> 

  reply	other threads:[~2025-06-16 16:33 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-24 17:26 [PATCH 0/9] drm/i915/dp: Implement POST_LT_ADJ_REQ Ville Syrjala
2025-02-24 17:26 ` [PATCH 1/9] drm/dp: Add definitions for POST_LT_ADJ training sequence Ville Syrjala
2025-02-25 15:55   ` Jani Nikula
2025-02-27 20:42   ` [PATCH v2 " Ville Syrjala
2025-06-16 16:28     ` Imre Deak
2025-02-24 17:26 ` [PATCH 2/9] drm/dp: Add POST_LT_ADJ_REQ helpers Ville Syrjala
2025-02-24 17:26 ` [PATCH 3/9] drm/i915/dp: Clear DPCD training pattern before transmitting the idle pattern Ville Syrjala
2025-02-24 17:26 ` [PATCH 4/9] drm/i915/dp: Have intel_dp_get_adjust_train() tell us if anything changed Ville Syrjala
2025-02-24 17:26 ` [PATCH 5/9] drm/i915/dp: Implement the POST_LT_ADJ_REQ sequence Ville Syrjala
2025-06-16 16:30   ` Imre Deak
2025-02-24 17:26 ` [PATCH 6/9] drm/i915/dp: Move intel_dp_training_pattern() Ville Syrjala
2025-02-24 17:26 ` [PATCH 7/9] drm/i915/dp: Implement .set_idle_link_train() for everyone Ville Syrjala
2025-06-16 16:31   ` Imre Deak [this message]
2025-02-24 17:26 ` [PATCH 8/9] drm/i915/dp: Make .set_idle_link_train() mandatory Ville Syrjala
2025-02-24 17:26 ` [PATCH 9/9] hax: drm/i915: Disable TPS4 support to force POST_LT_ADJ_REQ usage Ville Syrjala
2025-02-24 23:08 ` ✗ Fi.CI.CHECKPATCH: warning for drm/i915/dp: Implement POST_LT_ADJ_REQ Patchwork
2025-02-24 23:08 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-24 23:29 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-25  1:06 ` ✓ CI.Patch_applied: " Patchwork
2025-02-25  1:06 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-25  1:07 ` ✓ CI.KUnit: success " Patchwork
2025-02-25  1:24 ` ✓ CI.Build: " Patchwork
2025-02-25  1:26 ` ✓ CI.Hooks: " Patchwork
2025-02-25  1:28 ` ✗ CI.checksparse: warning " Patchwork
2025-02-25  1:46 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-25  2:11 ` ✓ i915.CI.Full: " Patchwork
2025-02-25  4:34 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-27 22:35 ` ✓ CI.Patch_applied: success for drm/i915/dp: Implement POST_LT_ADJ_REQ (rev2) Patchwork
2025-02-27 22:35 ` ✗ CI.checkpatch: warning " Patchwork
2025-02-27 22:37 ` ✓ CI.KUnit: success " Patchwork
2025-02-27 22:53 ` ✓ CI.Build: " Patchwork
2025-02-27 22:56 ` ✓ CI.Hooks: " Patchwork
2025-02-27 22:57 ` ✗ CI.checksparse: warning " Patchwork
2025-02-27 23:15 ` ✓ Xe.CI.BAT: success " Patchwork
2025-02-27 23:39 ` ✗ Fi.CI.CHECKPATCH: warning " Patchwork
2025-02-27 23:39 ` ✗ Fi.CI.SPARSE: " Patchwork
2025-02-28  0:01 ` ✓ i915.CI.BAT: success " Patchwork
2025-02-28  3:23 ` ✗ Xe.CI.Full: failure " Patchwork
2025-02-28  9:13 ` ✗ i915.CI.Full: " Patchwork
2025-06-16 16:25 ` [PATCH 0/9] drm/i915/dp: Implement POST_LT_ADJ_REQ 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=aFBG-5BOfl4lBLou@ideak-desk \
    --to=imre.deak@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=ville.syrjala@linux.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 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.