All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
Cc: intel-gfx@lists.freedesktop.org, intel-xe@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org, jani.nikula@linux.intel.com
Subject: Re: [PATCH 7/9] drm/dp: Add a helper to get the SDP type as a string
Date: Fri, 8 May 2026 17:38:20 +0300	[thread overview]
Message-ID: <af31XJIB7mrif6BX@intel.com> (raw)
In-Reply-To: <20260428074457.3566918-8-ankit.k.nautiyal@intel.com>

On Tue, Apr 28, 2026 at 01:14:55PM +0530, Ankit Nautiyal wrote:
> Introduce dp_sdp_type_get_name() to get the SDP type as a string.
> Use this to log the SDP type based on the sdp_type fields of the
> VSC and AS SDPs instead of the hardcoded strings.
> 
> v2: Modify the SDP names to match the DisplayPort Spec. (Ville)
> 
> Signed-off-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>

Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

> ---
>  drivers/gpu/drm/display/drm_dp_helper.c | 36 ++++++++++++++++++++++---
>  1 file changed, 32 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/gpu/drm/display/drm_dp_helper.c b/drivers/gpu/drm/display/drm_dp_helper.c
> index 5f523d0514a5..654be04431ad 100644
> --- a/drivers/gpu/drm/display/drm_dp_helper.c
> +++ b/drivers/gpu/drm/display/drm_dp_helper.c
> @@ -3487,10 +3487,38 @@ static const char *dp_content_type_get_name(enum dp_content_type content_type)
>  	}
>  }
>  
> +static const char *dp_sdp_type_get_name(unsigned char type)
> +{
> +	switch (type) {
> +	case DP_SDP_AUDIO_TIMESTAMP:
> +		return "Audio_TimeStamp";
> +	case DP_SDP_AUDIO_STREAM:
> +		return "Audio_Stream";
> +	case DP_SDP_EXTENSION:
> +		return "Extension";
> +	case DP_SDP_AUDIO_COPYMANAGEMENT:
> +		return "Audio_CopyManagement";
> +	case DP_SDP_ISRC:
> +		return "ISRC";
> +	case DP_SDP_VSC:
> +		return "VSC";
> +	case DP_SDP_PPS:
> +		return "PPS";
> +	case DP_SDP_VSC_EXT_VESA:
> +		return "VSC_EXT_VESA";
> +	case DP_SDP_VSC_EXT_CEA:
> +		return "VSC_EXT_CEA";
> +	case DP_SDP_ADAPTIVE_SYNC:
> +		return "Adaptive-Sync";
> +	default:
> +		return "Unknown";
> +	}
> +}
> +
>  void drm_dp_vsc_sdp_log(struct drm_printer *p, const struct drm_dp_vsc_sdp *vsc)
>  {
> -	drm_printf(p, "DP SDP: VSC, revision %u, length %u\n",
> -		   vsc->revision, vsc->length);
> +	drm_printf(p, "DP SDP: %s, revision %u, length %u\n",
> +		   dp_sdp_type_get_name(vsc->sdp_type), vsc->revision, vsc->length);
>  	drm_printf(p, "    pixelformat: %s\n",
>  		   dp_pixelformat_get_name(vsc->pixelformat));
>  	drm_printf(p, "    colorimetry: %s\n",
> @@ -3505,8 +3533,8 @@ EXPORT_SYMBOL(drm_dp_vsc_sdp_log);
>  
>  void drm_dp_as_sdp_log(struct drm_printer *p, const struct drm_dp_as_sdp *as_sdp)
>  {
> -	drm_printf(p, "DP SDP: AS_SDP, revision %u, length %u\n",
> -		   as_sdp->revision, as_sdp->length);
> +	drm_printf(p, "DP SDP: %s, revision %u, length %u\n",
> +		   dp_sdp_type_get_name(as_sdp->sdp_type), as_sdp->revision, as_sdp->length);
>  	drm_printf(p, "    vtotal: %d\n", as_sdp->vtotal);
>  	drm_printf(p, "    target rr: %d\n", as_sdp->target_rr);
>  	drm_printf(p, "    duration increase ms: %d\n", as_sdp->duration_incr_ms);
> -- 
> 2.45.2

-- 
Ville Syrjälä
Intel

  reply	other threads:[~2026-05-08 14:38 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-28  7:44 [PATCH 0/9] AS SDP cleanups and additions for Panel Replay + VRR Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 1/9] drm/dp: Rename and relocate AS SDP payload field masks Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 2/9] drm/dp: Clean up DPRX feature enumeration macros Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 3/9] drm/dp: Add bits for AS SDP FAVT Payload Fields Parsing support Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 4/9] drm/dp: Add DPCD for configuring AS SDP for PR + VRR Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 5/9] drm/dp: Refactor AS SDP logging to use space-separated field names Ankit Nautiyal
2026-05-08 14:36   ` Ville Syrjälä
2026-04-28  7:44 ` [PATCH 6/9] drm/dp: Store coasting vtotal in struct drm_dp_as_sdp Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 7/9] drm/dp: Add a helper to get the SDP type as a string Ankit Nautiyal
2026-05-08 14:38   ` Ville Syrjälä [this message]
2026-04-28  7:44 ` [PATCH 8/9] drm/dp: Add target_rr_divider field in AS SDP logging Ankit Nautiyal
2026-04-28  7:44 ` [PATCH 9/9] drm/dp: Use drm_printf_indent for DP " Ankit Nautiyal
2026-04-28 10:17   ` Jani Nikula
2026-04-28  8:31 ` ✓ CI.KUnit: success for AS SDP cleanups and additions for Panel Replay + VRR (rev2) Patchwork
2026-04-28  9:13 ` ✓ i915.CI.BAT: " Patchwork
2026-04-28  9:28 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-28 15:52 ` ✓ i915.CI.Full: " Patchwork
2026-04-28 17:34 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-05-11 14:21 ` [PATCH 0/9] AS SDP cleanups and additions for Panel Replay + VRR Nautiyal, Ankit K

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=af31XJIB7mrif6BX@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=ankit.k.nautiyal@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=jani.nikula@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.