public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Daniele Ceraolo Spurio <daniele.ceraolospurio@intel.com>
To: Matthew Brost <matthew.brost@intel.com>,
	<intel-gfx@lists.freedesktop.org>,
	<dri-devel@lists.freedesktop.org>
Subject: Re: [Intel-gfx] [PATCH] drm/i915/guc: Use correct context lock when callig clr_context_registered
Date: Thu, 9 Dec 2021 11:14:46 -0800	[thread overview]
Message-ID: <d1fb9875-4af7-301e-cd83-9aeb7e8a5b52@intel.com> (raw)
In-Reply-To: <20211209184814.21125-1-matthew.brost@intel.com>



On 12/9/2021 10:48 AM, Matthew Brost wrote:
> s/ce/cn/ when grabbing guc_state.lock before calling
> clr_context_registered.
>
> Fixes: 0f7976506de61 ("drm/i915/guc: Rework and simplify locking")
> Signed-off-by: Matthew Brost <matthew.brost@intel.com>
> Cc: <stable@vger.kernel.org>

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

I'm assuming we didn't see any splat from the lockdep assert in 
clr_context_registered in our CI runs because we never hit this case as 
it requires 64k+ contexts. Maybe we can add a selftest to purposely 
exercise this path? Not a blocker for merging this fix.

Daniele

> ---
>   drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> index 1f9d4fde421f..9b7b4f4e0d91 100644
> --- a/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> +++ b/drivers/gpu/drm/i915/gt/uc/intel_guc_submission.c
> @@ -1937,9 +1937,9 @@ static int steal_guc_id(struct intel_guc *guc, struct intel_context *ce)
>   		list_del_init(&cn->guc_id.link);
>   		ce->guc_id = cn->guc_id;
>   
> -		spin_lock(&ce->guc_state.lock);
> +		spin_lock(&cn->guc_state.lock);
>   		clr_context_registered(cn);
> -		spin_unlock(&ce->guc_state.lock);
> +		spin_unlock(&cn->guc_state.lock);
>   
>   		set_context_guc_id_invalid(cn);
>   


  reply	other threads:[~2021-12-09 19:14 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-12-09 18:48 [Intel-gfx] [PATCH] drm/i915/guc: Use correct context lock when callig clr_context_registered Matthew Brost
2021-12-09 19:14 ` Daniele Ceraolo Spurio [this message]
2021-12-10  8:41   ` Tvrtko Ursulin
2021-12-10 10:30     ` Jani Nikula
2021-12-10 17:50     ` Matthew Brost
2021-12-10  8:34 ` [Intel-gfx] ✓ Fi.CI.BAT: success for " Patchwork
2021-12-10 23:03 ` [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=d1fb9875-4af7-301e-cd83-9aeb7e8a5b52@intel.com \
    --to=daniele.ceraolospurio@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.brost@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