Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Nautiyal, Ankit K" <ankit.k.nautiyal@intel.com>
To: Suraj Kandpal <suraj.kandpal@intel.com>,
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH 1/7] drm/i915/hdcp: Move to direct reads for HDCP
Date: Wed, 24 Jan 2024 18:19:36 +0530	[thread overview]
Message-ID: <b1ebe726-5a31-4f46-8d46-82c4b1068eaa@intel.com> (raw)
In-Reply-To: <20240112074120.159797-2-suraj.kandpal@intel.com>


On 1/12/2024 1:11 PM, Suraj Kandpal wrote:
> Even for MST scenarios we need to do direct reads only on the
> immediate downstream device the rest of the authentication is taken
> care by that device. Remote reads will only be used to check
> capability of the monitors in MST topology.


I think it would be good to add fixes tag.


>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 14 +++++++-------
>   1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index 3a595cd433d4..bec49061b2e1 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -331,11 +331,11 @@ static const struct hdcp2_dp_msg_data hdcp2_dp_msg_data[] = {
>   };
>   
>   static struct drm_dp_aux *
> -intel_dp_hdcp_get_aux(struct intel_connector *connector)
> +intel_dp_hdcp_get_aux(struct intel_connector *connector, bool remote_req)
>   {
>   	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
>   
> -	if (intel_encoder_is_mst(connector->encoder))
> +	if (intel_encoder_is_mst(connector->encoder) && remote_req)
>   		return &connector->port->aux;
>   	else
>   		return &dig_port->dp.aux;


For most cases we are not using remote read/writes, so it makes sense to 
directly, use dig_port->dp.aux in those places.

Only case where we are interested to remote read is when its its an MST 
and we are interested to know the remote sink capability, in 
intel_dp_hdcp2_capable.


> @@ -346,7 +346,7 @@ intel_dp_hdcp2_read_rx_status(struct intel_connector *connector,
>   			      u8 *rx_status)
>   {
>   	struct drm_i915_private *i915 = to_i915(connector->base.dev);
> -	struct drm_dp_aux *aux = intel_dp_hdcp_get_aux(connector);
> +	struct drm_dp_aux *aux = intel_dp_hdcp_get_aux(connector, false);
>   	ssize_t ret;
>   
>   	ret = drm_dp_dpcd_read(aux,
> @@ -463,7 +463,7 @@ int intel_dp_hdcp2_write_msg(struct intel_connector *connector,
>   
>   	offset = hdcp2_msg_data->offset;
>   
> -	aux = intel_dp_hdcp_get_aux(connector);
> +	aux = intel_dp_hdcp_get_aux(connector, false);
>   
>   	/* No msg_id in DP HDCP2.2 msgs */
>   	bytes_to_write = size - 1;
> @@ -490,7 +490,7 @@ static
>   ssize_t get_receiver_id_list_rx_info(struct intel_connector *connector,
>   				     u32 *dev_cnt, u8 *byte)
>   {
> -	struct drm_dp_aux *aux = intel_dp_hdcp_get_aux(connector);
> +	struct drm_dp_aux *aux = intel_dp_hdcp_get_aux(connector, false);
>   	ssize_t ret;
>   	u8 *rx_info = byte;
>   
> @@ -530,7 +530,7 @@ int intel_dp_hdcp2_read_msg(struct intel_connector *connector,
>   		return -EINVAL;
>   	offset = hdcp2_msg_data->offset;
>   
> -	aux = intel_dp_hdcp_get_aux(connector);
> +	aux = intel_dp_hdcp_get_aux(connector, false);
>   
>   	ret = intel_dp_hdcp2_wait_for_msg(connector, hdcp2_msg_data);
>   	if (ret < 0)
> @@ -655,7 +655,7 @@ int intel_dp_hdcp2_capable(struct intel_connector *connector,
>   	u8 rx_caps[3];
>   	int ret;
>   
> -	aux = intel_dp_hdcp_get_aux(connector);
> +	aux = intel_dp_hdcp_get_aux(connector, true);

As mentioned above lets call this out clearly:

aux = intel_encoder_is_mst(connector->encoder) ? &connector->port->aux : 
&dig_port->dp.aux;

Regards,

Ankit

>   
>   	*capable = false;
>   	ret = drm_dp_dpcd_read(aux,

  reply	other threads:[~2024-01-24 12:49 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-12  7:41 [PATCH 0/7] HDCP Type1 MST fixes Suraj Kandpal
2024-01-12  7:41 ` [PATCH 1/7] drm/i915/hdcp: Move to direct reads for HDCP Suraj Kandpal
2024-01-24 12:49   ` Nautiyal, Ankit K [this message]
2024-01-12  7:41 ` [PATCH 2/7] drm/i915/hdcp: HDCP Capability for the downstream device Suraj Kandpal
2024-01-24 13:20   ` Nautiyal, Ankit K
2024-01-25  7:10     ` Nautiyal, Ankit K
2024-01-27  6:44       ` Kandpal, Suraj
2024-01-30  8:45         ` Nautiyal, Ankit K
2024-01-12  7:41 ` [PATCH 3/7] drm/i915/hdcp: Remove additional timing for reading mst hdcp message Suraj Kandpal
2024-01-30  8:53   ` Nautiyal, Ankit K
2024-01-12  7:41 ` [PATCH 4/7] drm/i915/hdcp: Extract hdcp structure from correct connector Suraj Kandpal
2024-01-12  7:41 ` [PATCH 5/7] drm/i915/hdcp: Allocate stream id after HDCP AKE stage Suraj Kandpal
2024-01-12  7:41 ` [PATCH 6/7] drm/i915/hdcp: Read Rxcaps for robustibility Suraj Kandpal
2024-01-12  7:41 ` [PATCH 7/7] drm/i915/display: fastset tbt pll thing Suraj Kandpal
2024-01-12  8:46 ` ✗ Fi.CI.SPARSE: warning for HDCP Type1 MST fixes Patchwork
2024-01-12  8:59 ` ✓ Fi.CI.BAT: success " Patchwork
2024-01-12 10:14 ` ✓ Fi.CI.IGT: " 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=b1ebe726-5a31-4f46-8d46-82c4b1068eaa@intel.com \
    --to=ankit.k.nautiyal@intel.com \
    --cc=intel-gfx@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