Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
To: Alan Previn <alan.previn.teres.alexis@intel.com>,
	<intel-gfx@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH v3 5/6] drm/i915/pxp: Make intel_pxp_start implicitly sort PXP-owning-GT
Date: Mon, 14 Nov 2022 20:20:29 -0800	[thread overview]
Message-ID: <444ebfbe-90e0-25b0-acb3-01cb93f1ecf2@intel.com> (raw)
In-Reply-To: <20221021173946.366210-6-alan.previn.teres.alexis@intel.com>



On 10/21/2022 10:39 AM, Alan Previn wrote:
> Make intel_pxp_is_start implicitly find the PXP-owning-GT.
> Callers of this function shall now pass in i915 since PXP
> is a global GPU feature. Make intel_pxp_start implicitly
> find the right gt to start PXP arb session so
> it's transparent to the callers.
>
> Signed-off-by: Alan Previn <alan.previn.teres.alexis@intel.com>

Reviewed-by: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>

Daniele

> ---
>   drivers/gpu/drm/i915/gem/i915_gem_context.c | 2 +-
>   drivers/gpu/drm/i915/pxp/intel_pxp.c        | 9 ++++++++-
>   drivers/gpu/drm/i915/pxp/intel_pxp.h        | 2 +-
>   3 files changed, 10 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gem/i915_gem_context.c b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> index 798e77398acc..af60f6494947 100644
> --- a/drivers/gpu/drm/i915/gem/i915_gem_context.c
> +++ b/drivers/gpu/drm/i915/gem/i915_gem_context.c
> @@ -272,7 +272,7 @@ static int proto_context_set_protected(struct drm_i915_private *i915,
>   		pc->pxp_wakeref = intel_runtime_pm_get(&i915->runtime_pm);
>   
>   		if (!intel_pxp_is_active(i915))
> -			ret = intel_pxp_start(&to_gt(i915)->pxp);
> +			ret = intel_pxp_start(i915);
>   	}
>   
>   	return ret;
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> index 2c835c38c527..c87f812ba13a 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> @@ -259,10 +259,17 @@ static bool pxp_component_bound(struct intel_pxp *pxp)
>    * the arb session is restarted from the irq work when we receive the
>    * termination completion interrupt
>    */
> -int intel_pxp_start(struct intel_pxp *pxp)
> +int intel_pxp_start(struct drm_i915_private *i915)
>   {
> +	struct intel_gt *gt = intel_pxp_get_owning_gt(i915);
> +	struct intel_pxp *pxp;
>   	int ret = 0;
>   
> +	if (!gt)
> +		return -ENODEV;
> +
> +	pxp = &gt->pxp;
> +
>   	if (!intel_gtpxp_is_enabled(pxp))
>   		return -ENODEV;
>   
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.h b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> index 7d93055cdd6b..c45949bb1f7b 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp.h
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.h
> @@ -31,7 +31,7 @@ void intel_pxp_fini_hw(struct intel_pxp *pxp);
>   
>   void intel_pxp_mark_termination_in_progress(struct intel_pxp *pxp);
>   
> -int intel_pxp_start(struct intel_pxp *pxp);
> +int intel_pxp_start(struct drm_i915_private *i915);
>   
>   int intel_pxp_key_check(struct intel_pxp *pxp,
>   			struct drm_i915_gem_object *obj,


  reply	other threads:[~2022-11-15  4:20 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-21 17:39 [Intel-gfx] [PATCH v3 0/6] drm/i915/pxp: Prepare intel_pxp entry points for MTL Alan Previn
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 1/6] drm/i915/pxp: Make gt and pxp init/fini aware of PXP-owning-GT Alan Previn
2022-11-15  4:00   ` Ceraolo Spurio, Daniele
2022-11-15  5:10     ` Teres Alexis, Alan Previn
2022-11-16 21:41       ` Teres Alexis, Alan Previn
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 2/6] drm/i915/pxp: Make intel_pxp_is_enabled implicitly sort PXP-owning-GT Alan Previn
2022-11-15  4:11   ` Ceraolo Spurio, Daniele
2022-11-15  5:23     ` Teres Alexis, Alan Previn
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 3/6] drm/i915/pxp: Make intel_pxp_is_active " Alan Previn
2022-11-15  4:17   ` Ceraolo Spurio, Daniele
2022-11-15  5:26     ` Teres Alexis, Alan Previn
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 4/6] drm/i915/pxp: Make PXP tee component bind/unbind aware of PXP-owning-GT Alan Previn
2022-11-15  4:19   ` Ceraolo Spurio, Daniele
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 5/6] drm/i915/pxp: Make intel_pxp_start implicitly sort PXP-owning-GT Alan Previn
2022-11-15  4:20   ` Ceraolo Spurio, Daniele [this message]
2022-10-21 17:39 ` [Intel-gfx] [PATCH v3 6/6] drm/i915/pxp: Make intel_pxp_key_check " Alan Previn
2022-11-15  4:21   ` Ceraolo Spurio, Daniele
2022-10-21 18:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for drm/i915/pxp: Prepare intel_pxp entry points for MTL (rev3) Patchwork
2022-10-22 11:44 ` [Intel-gfx] ✗ Fi.CI.IGT: failure " 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=444ebfbe-90e0-25b0-acb3-01cb93f1ecf2@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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