From: Jani Nikula <jani.nikula@linux.intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
intel-xe@lists.freedesktop.org, intel-gfx@lists.freedesktop.org
Cc: ankit.k.nautiyal@intel.com, Suraj Kandpal <suraj.kandpal@intel.com>
Subject: Re: [PATCH] drm/i915/hdcp: Use HDCP2_STREAM_STATUS to verify content type status
Date: Thu, 19 Jun 2025 11:43:33 +0300 [thread overview]
Message-ID: <9447239ea5d3bd0e42383868c3da0e5dcda0412a@intel.com> (raw)
In-Reply-To: <20250619040519.3375518-1-suraj.kandpal@intel.com>
On Thu, 19 Jun 2025, Suraj Kandpal <suraj.kandpal@intel.com> wrote:
> From PTL we need to move to using HDCP2_STREAM_STATUS to check if
> the written content type info is the same as we expect since
> HDCP2_AUTH_STREAM is inaccessible to us now.
The commit message talks about "verify" and "check", but in reality it's
just a warning and move on.
When can this happen?
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 13 ++++++++++---
> 1 file changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 7bd775fb65a0..131fc0cae13b 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -806,9 +806,11 @@ intel_dp_mst_hdcp2_stream_encryption(struct intel_connector *connector,
> enum port port = dig_port->base.port;
> int ret;
>
> - drm_WARN_ON(display->drm, enable &&
> - !!(intel_de_read(display, HDCP2_AUTH_STREAM(display, cpu_transcoder, port))
> - & AUTH_STREAM_TYPE) != data->streams[0].stream_type);
> + if (DISPLAY_VER(display) < 30)
> + drm_WARN_ON(display->drm, enable &&
> + !!(intel_de_read(display,
> + HDCP2_AUTH_STREAM(display, cpu_transcoder, port))
> + & AUTH_STREAM_TYPE) != data->streams[0].stream_type);
As a side note, can we please stop shoving complex intel_de_reads()
inside a WARN_ON()? Separate the read and conditions for the warn.
Moreover, stream_type is u8, and it's compared some boolean logic.
>
> ret = intel_dp_mst_toggle_hdcp_stream_select(connector, enable);
> if (ret)
> @@ -824,6 +826,11 @@ intel_dp_mst_hdcp2_stream_encryption(struct intel_connector *connector,
> return -ETIMEDOUT;
> }
>
> + if (DISPLAY_VER(display) >= 30)
> + drm_WARN_ON(display->drm, enable &&
> + !!(intel_de_read(display,
> + HDCP2_STREAM_STATUS(display, cpu_transcoder, port))
> + & STREAM_TYPE_STATUS) != data->streams[0].stream_type);
And this is now duplicated in two places.
Please deduplicate and simplify.
BR,
Jani.
> return 0;
> }
--
Jani Nikula, Intel
next prev parent reply other threads:[~2025-06-19 8:43 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-06-19 4:05 [PATCH] drm/i915/hdcp: Use HDCP2_STREAM_STATUS to verify content type status Suraj Kandpal
2025-06-19 7:23 ` ✓ i915.CI.BAT: success for " Patchwork
2025-06-19 8:26 ` [PATCH] " Golani, Mitulkumar Ajitkumar
2025-06-19 8:33 ` Kandpal, Suraj
2025-06-19 8:43 ` Jani Nikula [this message]
2025-06-19 8:50 ` Kandpal, Suraj
2025-06-19 9:04 ` Jani Nikula
2025-06-19 17:09 ` ✗ i915.CI.Full: failure for " 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=9447239ea5d3bd0e42383868c3da0e5dcda0412a@intel.com \
--to=jani.nikula@linux.intel.com \
--cc=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=intel-xe@lists.freedesktop.org \
--cc=suraj.kandpal@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