From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
<intel-gfx@lists.freedesktop.org>
Cc: <uma.shankar@intel.com>
Subject: Re: [PATCH 05/11] drm/i915/hdcp: Add new remote capability check shim function
Date: Wed, 7 Feb 2024 10:28:28 +0530 [thread overview]
Message-ID: <2ccbfd41-6a2f-4fa1-832b-9aa67d4b29bb@intel.com> (raw)
In-Reply-To: <20240204142505.1157146-6-suraj.kandpal@intel.com>
On 2/4/2024 7:54 PM, Suraj Kandpal wrote:
> Create a remote HDCP capability shim function which can read the
> remote monitor HDCP capability when in MST configuration.
>
> --v2
> -Add an assertion to make sure only mst encoder call this remote_cap
> function [Ankit]
>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
> .../drm/i915/display/intel_display_types.h | 4 +++
> drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 26 +++++++++++++++++++
> drivers/gpu/drm/i915/display/intel_hdcp.c | 16 ++++++++++++
> drivers/gpu/drm/i915/display/intel_hdcp.h | 3 +++
> 4 files changed, 49 insertions(+)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_display_types.h b/drivers/gpu/drm/i915/display/intel_display_types.h
> index ae2e8cff9d69..7e7a370a3b30 100644
> --- a/drivers/gpu/drm/i915/display/intel_display_types.h
> +++ b/drivers/gpu/drm/i915/display/intel_display_types.h
> @@ -532,6 +532,10 @@ struct intel_hdcp_shim {
> /* HDCP2.2 Link Integrity Check */
> int (*check_2_2_link)(struct intel_digital_port *dig_port,
> struct intel_connector *connector);
> +
> + /* HDCP remote sink cap */
> + int (*remote_hdcp_cap)(struct intel_connector *connector,
> + bool *hdcp_capable, bool *hdcp2_capable);
> };
>
> struct intel_hdcp {
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index ef1a4c90c225..ccd274200f92 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -668,6 +668,31 @@ int intel_dp_hdcp2_capable(struct intel_connector *connector,
> return _intel_dp_hdcp2_capable(aux, capable);
> }
>
> +static
> +int intel_dp_hdcp_remote_cap(struct intel_connector *connector,
> + bool *hdcp_capable, bool *hdcp2_capable)
> +{
> + struct drm_i915_private *i915 = to_i915(connector->base.dev);
> + struct drm_dp_aux *aux = &connector->port->aux;
> + u8 bcaps;
> + int ret;
> +
> + if (!intel_encoder_is_mst(connector->encoder))
> + return -EINVAL;
> +
> + ret = _intel_dp_hdcp2_capable(aux, hdcp2_capable);
> + if (ret)
> + return ret;
> +
> + ret = intel_dp_hdcp_read_bcaps(aux, i915, &bcaps);
> + if (ret)
> + return ret;
> +
> + *hdcp_capable = bcaps & DP_BCAPS_HDCP_CAPABLE;
> +
> + return 0;
> +}
> +
> static const struct intel_hdcp_shim intel_dp_hdcp_shim = {
> .write_an_aksv = intel_dp_hdcp_write_an_aksv,
> .read_bksv = intel_dp_hdcp_read_bksv,
> @@ -685,6 +710,7 @@ static const struct intel_hdcp_shim intel_dp_hdcp_shim = {
> .config_stream_type = intel_dp_hdcp2_config_stream_type,
> .check_2_2_link = intel_dp_hdcp2_check_link,
> .hdcp_2_2_capable = intel_dp_hdcp2_capable,
> + .remote_hdcp_cap = intel_dp_hdcp_remote_cap,
> .protocol = HDCP_PROTOCOL_DP,
> };
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 4593ac10e2fa..2b739249b60c 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -205,6 +205,22 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
> return capable;
> }
>
> +void intel_hdcp_remote_cap(struct intel_connector *connector,
> + bool *hdcp_capable,
> + bool *hdcp2_capable)
> +{
> + struct intel_hdcp *hdcp = &connector->hdcp;
> +
> + /* Remote Sink's capability for HDCP */
I think we can do away with this comment.
Otherwise looks good to me.
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> + if (!hdcp->shim->remote_hdcp_cap)
> + return;
> +
> + hdcp->shim->remote_hdcp_cap(connector, hdcp_capable, hdcp2_capable);
> +
> + if (intel_hdcp2_prerequisite(connector))
> + *hdcp2_capable = false;
> +}
> +
> static bool intel_hdcp_in_use(struct drm_i915_private *i915,
> enum transcoder cpu_transcoder, enum port port)
> {
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.h b/drivers/gpu/drm/i915/display/intel_hdcp.h
> index a9c784fd9ba5..213d286ca3fa 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.h
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.h
> @@ -40,6 +40,9 @@ void intel_hdcp_update_pipe(struct intel_atomic_state *state,
> bool is_hdcp_supported(struct drm_i915_private *i915, enum port port);
> bool intel_hdcp_capable(struct intel_connector *connector);
> bool intel_hdcp2_capable(struct intel_connector *connector);
> +void intel_hdcp_remote_cap(struct intel_connector *connector,
> + bool *hdcp_capable,
> + bool *hdcp2_capable);
> void intel_hdcp_component_init(struct drm_i915_private *i915);
> void intel_hdcp_component_fini(struct drm_i915_private *i915);
> void intel_hdcp_cleanup(struct intel_connector *connector);
next prev parent reply other threads:[~2024-02-07 4:58 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-04 14:24 [PATCH 00/11] HDCP Type1 MST fixes Suraj Kandpal
2024-02-04 14:24 ` [PATCH 01/11] drm/i915/hdcp: Move to direct reads for HDCP Suraj Kandpal
2024-02-04 14:24 ` [PATCH 02/11] drm/i915/hdcp: Move source hdcp2 checks into its own function Suraj Kandpal
2024-02-04 14:24 ` [PATCH 03/11] drm/i915/hdcp: Refactor intel_dp_hdcp2_capable Suraj Kandpal
2024-02-04 14:24 ` [PATCH 04/11] drm/i915/hdcp: Pass drm_dp_aux to read_bcaps function Suraj Kandpal
2024-02-04 14:24 ` [PATCH 05/11] drm/i915/hdcp: Add new remote capability check shim function Suraj Kandpal
2024-02-07 4:58 ` Nautiyal, Ankit K [this message]
2024-02-09 9:31 ` Jani Nikula
2024-02-04 14:25 ` [PATCH 06/11] drm/i915/hdcp: HDCP Capability for the downstream device Suraj Kandpal
2024-02-07 5:31 ` Nautiyal, Ankit K
2024-02-04 14:25 ` [PATCH 07/11] drm/i915/hdcp: Remove additional timing for reading mst hdcp message Suraj Kandpal
2024-02-04 14:25 ` [PATCH 08/11] drm/i915/hdcp: Extract hdcp structure from correct connector Suraj Kandpal
2024-02-04 14:25 ` [PATCH 09/11] drm/i915/hdcp: Save acquire_ctx in intel_hdcp Suraj Kandpal
2024-02-04 14:25 ` [PATCH 10/11] drm/i915/hdcp: Allocate stream id after HDCP AKE stage Suraj Kandpal
2024-02-04 14:25 ` [PATCH 11/11] drm/i915/hdcp: Read Rxcaps for robustibility Suraj Kandpal
2024-02-04 15:19 ` ✗ Fi.CI.SPARSE: warning for HDCP Type1 MST fixes Patchwork
2024-02-04 15:24 ` ✓ Fi.CI.BAT: success " Patchwork
2024-02-04 16:56 ` ✗ Fi.CI.IGT: failure " Patchwork
-- strict thread matches above, loose matches on Subject: below --
2024-02-04 7:39 [PATCH 00/11] " Suraj Kandpal
2024-02-04 7:39 ` [PATCH 05/11] drm/i915/hdcp: Add new remote capability check shim function Suraj Kandpal
2024-02-02 6:38 [PATCH 00/11] HDCP Type1 MST fixes Suraj Kandpal
2024-02-02 6:38 ` [PATCH 05/11] drm/i915/hdcp: Add new remote capability check shim function Suraj Kandpal
2024-02-02 10:01 ` 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=2ccbfd41-6a2f-4fa1-832b-9aa67d4b29bb@intel.com \
--to=ankit.k.nautiyal@intel.com \
--cc=intel-gfx@lists.freedesktop.org \
--cc=suraj.kandpal@intel.com \
--cc=uma.shankar@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