All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ceraolo Spurio, Daniele" <daniele.ceraolospurio@intel.com>
To: Juston Li <justonli@google.com>, <intel-gfx@lists.freedesktop.org>
Cc: alan.previn.teres.alexis@intel.com
Subject: Re: [Intel-gfx] [PATCH] drm/i915/pxp: don't start pxp without mei_pxp bind
Date: Tue, 9 Aug 2022 16:10:18 -0700	[thread overview]
Message-ID: <281b60de-017b-0b86-d35e-ee7bc619b1db@intel.com> (raw)
In-Reply-To: <20220809225700.2002634-1-justonli@google.com>



On 8/9/2022 3:57 PM, Juston Li wrote:
> pxp will not start correctly until after mei_pxp bind completes and
> intel_pxp_init_hw() is called.
>
> Signed-off-by: Juston Li <justonli@google.com>
> ---
>   drivers/gpu/drm/i915/pxp/intel_pxp.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/i915/pxp/intel_pxp.c b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> index 15311eaed848..3ef9e4e1870b 100644
> --- a/drivers/gpu/drm/i915/pxp/intel_pxp.c
> +++ b/drivers/gpu/drm/i915/pxp/intel_pxp.c
> @@ -184,7 +184,7 @@ int intel_pxp_start(struct intel_pxp *pxp)
>   {
>   	int ret = 0;
>   
> -	if (!intel_pxp_is_enabled(pxp))
> +	if (!intel_pxp_is_enabled(pxp) || !pxp->pxp_component_added)

pxp_component_added being true only indicates that we've called 
component_add and not if the component is currently bound. For checking 
the current state of the component you can look at the 
pxp->pxp_component pointer, which is set/cleared on component 
bind/unbind. Note that pxp_component has to be accessed under 
pxp->tee_mutex.

Are you actually seeing a scenario where the user manages to submit 
before the bind is complete? the bind is async to i915, but I've always 
seen it complete before control was given to the user to start submitting.

Daniele

>   		return -ENODEV;
>   
>   	mutex_lock(&pxp->arb_mutex);


  reply	other threads:[~2022-08-09 23:10 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-09 22:57 [Intel-gfx] [PATCH] drm/i915/pxp: don't start pxp without mei_pxp bind Juston Li
2022-08-09 23:10 ` Ceraolo Spurio, Daniele [this message]
2022-08-09 23:20   ` Juston Li
2022-08-09 23:23     ` Ceraolo Spurio, Daniele
2022-08-09 23:30       ` Juston Li
2022-08-09 23:51 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2022-08-10  1:41 ` [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=281b60de-017b-0b86-d35e-ee7bc619b1db@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=alan.previn.teres.alexis@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=justonli@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.