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] drm/i915/hdcp: Use correct cp_irq_count
Date: Wed, 14 Aug 2024 12:34:50 +0530	[thread overview]
Message-ID: <44f63fde-c928-4b6c-a36e-735d33b0c8fd@intel.com> (raw)
In-Reply-To: <20240809114127.3940699-2-suraj.kandpal@intel.com>


On 8/9/2024 5:11 PM, Suraj Kandpal wrote:
> We are checking cp_irq_count from the wrong hdcp structure which
> ends up giving timed out errors. We only increment the cp_irq_count
> of the primary connector's hdcp structure but here in case of
> multidisplay setup we end up checking the secondary connector's hdcp
> structure, which will not have its cp_irq_count incremented. This leads
> to a timed out at CP_IRQ error even though a CP_IRQ was raised. Extract
> it from the correct intel_hdcp structure.

It would be good to have helpers to get the correct hdcp structure based 
on the context, perhaps as part of a separate series.

In any case, the change looks good to me.

Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>


>
> --v2
> -Explain why it was the wrong hdcp structure [Jani]
>
> Fixes: 8c9e4f68b861 ("drm/i915/hdcp: Use per-device debugs")
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_dp_hdcp.c | 4 +++-
>   1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> index ec357d2670f1..3425b3643143 100644
> --- a/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_dp_hdcp.c
> @@ -39,7 +39,9 @@ static u32 transcoder_to_stream_enc_status(enum transcoder cpu_transcoder)
>   static void intel_dp_hdcp_wait_for_cp_irq(struct intel_connector *connector,
>   					  int timeout)
>   {
> -	struct intel_hdcp *hdcp = &connector->hdcp;
> +	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
> +	struct intel_dp *dp = &dig_port->dp;
> +	struct intel_hdcp *hdcp = &dp->attached_connector->hdcp;
>   	long ret;
>   
>   #define C (hdcp->cp_irq_count_cached != atomic_read(&hdcp->cp_irq_count))

  reply	other threads:[~2024-08-14  7:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-09  5:44 [PATCH] drm/i915/hdcp: Use correct cp_irq_count Suraj Kandpal
2024-08-09  6:25 ` ✓ Fi.CI.BAT: success for " Patchwork
2024-08-09  8:21 ` [PATCH] " Jani Nikula
2024-08-09 11:38   ` Kandpal, Suraj
2024-08-09 11:41 ` Suraj Kandpal
2024-08-14  7:04   ` Nautiyal, Ankit K [this message]
2024-08-09 12:35 ` ✓ Fi.CI.BAT: success for drm/i915/hdcp: Use correct cp_irq_count (rev2) Patchwork
2024-08-10  6:22 ` ✗ Fi.CI.IGT: failure for drm/i915/hdcp: Use correct cp_irq_count Patchwork
2024-08-10 18:02 ` ✗ Fi.CI.IGT: failure for drm/i915/hdcp: Use correct cp_irq_count (rev2) Patchwork
2024-08-14 15:53 ` ✓ Fi.CI.IGT: success " Patchwork
2024-08-14 16:10 ` 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=44f63fde-c928-4b6c-a36e-735d33b0c8fd@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