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: [Intel-gfx] [PATCH] drm/i915/hdcp: Check if media_gt exists
Date: Thu, 4 May 2023 16:04:16 +0530	[thread overview]
Message-ID: <6b0f2637-ca92-0f06-08cd-61665f7c9472@intel.com> (raw)
In-Reply-To: <20230503101206.579877-1-suraj.kandpal@intel.com>

I think we can add fixes tag:

Fixes: 883631771038 ("drm/i915/mtl: Add HDCP GSC interface")

with relevant folks in CC.

Otherwise, LGTM.

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

On 5/3/2023 3:42 PM, Suraj Kandpal wrote:
> Check if media_gt exists if we are using gsc cs
>
> --v2
> -correct typo [Ankit]
> -assign gsc variable if gt exists [Ankit]
>
> --v3
> -declare gsc and gt variables in if block [Ankit]
>
> Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
> Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
> Reviewed-by: Gustavo Sousa <gustavo.sousa@intel.com>
> ---
>   drivers/gpu/drm/i915/display/intel_hdcp.c | 10 ++++++----
>   1 file changed, 6 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/display/intel_hdcp.c b/drivers/gpu/drm/i915/display/intel_hdcp.c
> index 650232c4892b..b183efab04a1 100644
> --- a/drivers/gpu/drm/i915/display/intel_hdcp.c
> +++ b/drivers/gpu/drm/i915/display/intel_hdcp.c
> @@ -204,8 +204,6 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
>   	struct intel_digital_port *dig_port = intel_attached_dig_port(connector);
>   	struct drm_i915_private *dev_priv = to_i915(connector->base.dev);
>   	struct intel_hdcp *hdcp = &connector->hdcp;
> -	struct intel_gt *gt = dev_priv->media_gt;
> -	struct intel_gsc_uc *gsc = &gt->uc.gsc;
>   	bool capable = false;
>   
>   	/* I915 support for HDCP2.2 */
> @@ -213,9 +211,13 @@ bool intel_hdcp2_capable(struct intel_connector *connector)
>   		return false;
>   
>   	/* If MTL+ make sure gsc is loaded and proxy is setup */
> -	if (intel_hdcp_gsc_cs_required(dev_priv))
> -		if (!intel_uc_fw_is_running(&gsc->fw))
> +	if (intel_hdcp_gsc_cs_required(dev_priv)) {
> +		struct intel_gt *gt = dev_priv->media_gt;
> +		struct intel_gsc_uc *gsc = gt ? &gt->uc.gsc : NULL;
> +
> +		if (!gsc || !intel_uc_fw_is_running(&gsc->fw))
>   			return false;
> +	}
>   
>   	/* MEI/GSC interface is solid depending on which is used */
>   	mutex_lock(&dev_priv->display.hdcp.comp_mutex);

  reply	other threads:[~2023-05-04 10:34 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-02  8:36 [Intel-gfx] [PATCH] drm/i915/hdcp: Check if media_gt exists Suraj Kandpal
2023-05-02 10:15 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2023-05-02 12:01 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-02 15:59 ` [Intel-gfx] [PATCH] " Gustavo Sousa
2023-05-03  1:37 ` Suraj Kandpal
2023-05-03  9:41   ` Nautiyal, Ankit K
2023-05-03 10:12   ` Suraj Kandpal
2023-05-04 10:34     ` Nautiyal, Ankit K [this message]
2023-05-05  4:15     ` Suraj Kandpal
2023-05-03  2:24 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdcp: Check if media_gt exists (rev2) Patchwork
2023-05-03  3:47 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " Patchwork
2023-05-03 11:36 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdcp: Check if media_gt exists (rev3) Patchwork
2023-05-03 14:59 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork
2023-05-05  4:54 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/hdcp: Check if media_gt exists (rev4) Patchwork
2023-05-05 10:15 ` [Intel-gfx] ✓ 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=6b0f2637-ca92-0f06-08cd-61665f7c9472@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