All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "George D. Sworo" <george.d.sworo@intel.com>
Cc: intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org,
	dri-devel@lists.freedesktop.org
Subject: Re: [PATCH] drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST
Date: Fri, 25 Sep 2026 04:17:34 +0000	[thread overview]
Message-ID: <20260925041735.66A191F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260925035639.2034315-1-george.d.sworo@intel.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] drm/i915: stale cached HDCP capability causes spurious atomic check failures
--

commit 74bd0c52833336220c44be4fec288971d8f48f92
Author: George D. Sworo <george.d.sworo@intel.com>

drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST

This commit queries the downstream sink through its MST remote AUX channel
during HDCP initialization to cache whether HDCP Type 1 is unsupported. It
then uses this cached value in intel_hdcp_atomic_check() to reject invalid
HDCP Type 1 requests early.

> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index e56df337dc6d8..7490fc0fd96ab 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
[ ... ]
> @@ -2421,6 +2441,10 @@ int intel_hdcp_init(struct intel_connector *connector,
>  	if (is_hdcp2_supported(display))
>  		intel_hdcp2_init(connector, dig_port, shim);
>  
> +	/* Cache the remote capability before atomic checks can run. */
> +	connector->mst.type1_unsupported =
> +		intel_hdcp_mst_type1_is_unsupported(connector, shim);

[Severity: Medium]
Does caching this capability during intel_hdcp_init() fail to account for
subsequent monitor hotplugs? If an MST dock is connected with an HDCP 1.x
monitor (or no monitor) initially, connector->mst.type1_unsupported evaluates
to true. If an HDCP 2.x monitor is later hotplugged into the same port, the
stale cached value will remain.

>  	ret = drm_connector_attach_content_protection_property(&connector->base,
>  							       hdcp->hdcp2_supported);
[ ... ]
> @@ -2700,7 +2725,20 @@ void intel_hdcp_atomic_check(struct drm_connector *connector,
>  		if (old_cp == DRM_MODE_CONTENT_PROTECTION_ENABLED)
>  			new_state->content_protection =
>  				DRM_MODE_CONTENT_PROTECTION_DESIRED;
> -		return;
> +		return 0;
> +	}
> +
> +	/*
> +	 * Fail fast if userspace asks for Type1 but neither the platform nor
> +	 * the downstream sink can do HDCP 2.x, instead of only discovering
> +	 * this once intel_hdcp_enable() is reached.
> +	 */
> +	if (new_cp == DRM_MODE_CONTENT_PROTECTION_DESIRED &&
> +	    new_state->hdcp_content_type == DRM_MODE_HDCP_CONTENT_TYPE1 &&
> +	    intel_connector->mst.type1_unsupported) {
> +		drm_dbg_kms(connector->dev,
> +			    "HDCP Type1 requested without HDCP 2.x support\n");
> +		return -EOPNOTSUPP;
>  	}

[Severity: Medium]
Could this lead to spurious rejections of valid HDCP Type 1 requests for
hotplugged monitors? When userspace requests HDCP Type 1 for a newly connected
HDCP 2.x monitor, the atomic check reads the stale cached flag and spuriously
fails the request with -EOPNOTSUPP, preventing the display of premium content.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260925035639.2034315-1-george.d.sworo@intel.com?part=1

  parent reply	other threads:[~2026-09-25  4:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-25  3:56 [PATCH] drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST George D. Sworo
2026-09-25  4:00 ` ✓ CI.KUnit: success for " Patchwork
2026-09-25  4:17 ` sashiko-bot [this message]
2026-09-25  4:36 ` ✓ i915.CI.BAT: " Patchwork
2026-09-25  4:57 ` ✓ Xe.CI.BAT: " Patchwork
2026-09-25  5:00 ` ✗ Fi.CI.BUILD: failure for drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST (rev2) Patchwork
2026-09-25  5:03 ` [PATCH v2] drm/i915/hdcp: refresh MST Type1 capability per sink George D. Sworo
2026-09-25  5:17 ` [PATCH] drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST Kandpal, Suraj
2026-09-25  5:26 ` [PATCH v3] " George D. Sworo
2026-09-25  5:28   ` Kandpal, Suraj
2026-09-25  5:34   ` sashiko-bot
2026-09-25  6:06 ` ✓ i915.CI.BAT: success for drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST (rev3) Patchwork
2026-09-25 14:16 ` ✓ Xe.CI.FULL: success for drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST Patchwork
2026-09-26  0:06 ` ✓ i915.CI.Full: success for drm/i915/hdcp: Fail fast when HDCP Type 1 is unsupported via MST (rev3) 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=20260925041735.66A191F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=george.d.sworo@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=intel-xe@lists.freedesktop.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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.