All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Imre Deak <imre.deak@intel.com>
Cc: intel-gfx@lists.freedesktop.org
Subject: Re: [PATCH 5/5] drm/i915/dp: Dump the LTTPR PHY descriptors
Date: Fri, 5 Jul 2024 18:18:58 +0300	[thread overview]
Message-ID: <ZogO4ijb5t0rRm02@intel.com> (raw)
In-Reply-To: <20240703155937.1674856-6-imre.deak@intel.com>

On Wed, Jul 03, 2024 at 06:59:37PM +0300, Imre Deak wrote:
> Dump the descriptor of the detected LTTPRs in non-transparent mode to
> help the debugging related to LTTPRs easier.
> 
> Signed-off-by: Imre Deak <imre.deak@intel.com>
> ---
>  .../drm/i915/display/intel_dp_link_training.c | 22 ++++++++++++++++++-
>  1 file changed, 21 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_link_training.c b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> index 31089f1b316d2..52b149793f3d0 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_link_training.c
> @@ -199,6 +199,24 @@ static int intel_dp_init_lttpr_phys(struct intel_dp *intel_dp, const u8 dpcd[DP_
>  	return 0;
>  }
>  
> +static void intel_dp_dump_lttpr_phy_desc(struct intel_dp *intel_dp, enum drm_dp_phy dp_phy)
> +{
> +	struct drm_i915_private *i915 = dp_to_i915(intel_dp);
> +	struct drm_dp_dpcd_ident ident;
> +
> +	if (drm_dp_dpcd_read(&intel_dp->aux, DP_OUI_PHY_REPEATER(dp_phy),
> +			     &ident, sizeof(ident)) < 0)
> +		return;
> +
> +	drm_dbg_kms(&i915->drm,
> +		    "%s: %s: OUI %*phD dev-ID %*pE HW-rev %d.%d SW-rev %d.%d\n",
> +		    intel_dp->aux.name, drm_dp_phy_name(dp_phy),
> +		    (int)sizeof(ident.oui), ident.oui,
> +		    (int)strnlen(ident.device_id, sizeof(ident.device_id)), ident.device_id,
> +		    ident.hw_rev >> 4, ident.hw_rev & 0xf,
> +		    ident.sw_major_rev, ident.sw_minor_rev);

Dunno if we could share some code with drm_dp_read_desc()...

> +}
> +
>  static int intel_dp_init_lttpr(struct intel_dp *intel_dp, const u8 dpcd[DP_RECEIVER_CAP_SIZE])
>  {
>  	int lttpr_count;
> @@ -206,8 +224,10 @@ static int intel_dp_init_lttpr(struct intel_dp *intel_dp, const u8 dpcd[DP_RECEI
>  
>  	lttpr_count = intel_dp_init_lttpr_phys(intel_dp, dpcd);
>  
> -	for (i = 0; i < lttpr_count; i++)
> +	for (i = 0; i < lttpr_count; i++) {
>  		intel_dp_read_lttpr_phy_caps(intel_dp, dpcd, DP_PHY_LTTPR(i));
> +		intel_dp_dump_lttpr_phy_desc(intel_dp, DP_PHY_LTTPR(i));
> +	}
>  
>  	return lttpr_count;
>  }
> -- 
> 2.43.3

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2024-07-05 15:19 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-07-03 15:59 [PATCH 0/5] drm/i915/dp: Fix LTTPR detection Imre Deak
2024-07-03 15:59 ` [PATCH 1/5] drm/i915/dp: Don't switch the LTTPR mode on an active link Imre Deak
2024-07-04  2:09   ` Yu, Gareth
2024-07-05 15:16   ` Ville Syrjälä
2024-07-05 16:46     ` Imre Deak
2024-07-03 15:59 ` [PATCH 2/5] drm/i915/dp: Reset cached LTTPR count if number of LTTPRs is unsupported Imre Deak
2024-07-03 15:59 ` [PATCH 3/5] drm/i915/dp: Keep cached LTTPR mode up-to-date Imre Deak
2024-07-03 15:59 ` [PATCH 4/5] drm/dp: Add the LTTPR PHY OUI DPCD register Imre Deak
2024-07-03 15:59 ` [PATCH 5/5] drm/i915/dp: Dump the LTTPR PHY descriptors Imre Deak
2024-07-05 15:18   ` Ville Syrjälä [this message]
2024-07-05 16:49     ` Imre Deak
2024-07-03 17:16 ` ✗ Fi.CI.SPARSE: warning for drm/i915/dp: Fix LTTPR detection Patchwork
2024-07-03 17:32 ` ✓ Fi.CI.BAT: success " Patchwork
2024-07-04  8:21 ` ✗ Fi.CI.IGT: failure " 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=ZogO4ijb5t0rRm02@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=imre.deak@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.