public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
Cc: Intel-gfx@lists.freedesktop.org, dri-devel@lists.freedesktop.org
Subject: Re: [Intel-gfx] [PATCH 1/2] drm/i915: Fix assert in i915_ggtt_pin
Date: Fri, 25 Feb 2022 19:58:49 +0200	[thread overview]
Message-ID: <YhkY2dxBDnUG6tQV@intel.com> (raw)
In-Reply-To: <20220225174118.1320237-1-tvrtko.ursulin@linux.intel.com>

On Fri, Feb 25, 2022 at 05:41:17PM +0000, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> 
> Use lockdep_assert_not_held to simplify and correct the code. Otherwise
> false positive are hit if lock state is uknown like after a previous
> taint.
> 
> Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
> Reported-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
> ---
>  drivers/gpu/drm/i915/i915_vma.c | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/i915_vma.c b/drivers/gpu/drm/i915/i915_vma.c
> index 3558b16a929c..4469b7f52853 100644
> --- a/drivers/gpu/drm/i915/i915_vma.c
> +++ b/drivers/gpu/drm/i915/i915_vma.c
> @@ -1552,9 +1552,7 @@ int i915_ggtt_pin(struct i915_vma *vma, struct i915_gem_ww_ctx *ww,
>  	if (ww)
>  		return __i915_ggtt_pin(vma, ww, align, flags);
>  
> -#ifdef CONFIG_LOCKDEP
> -	WARN_ON(dma_resv_held(vma->obj->base.resv));
> -#endif
> +	lockdep_assert_not_held(&vma->obj->base.resv->lock.base);

Should there be a dma_resv wrapper for that? Shrug.

Makes sense to me:
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>

I'll leave the other one to someone how knows how it's actually used.

>  
>  	for_i915_gem_ww(&_ww, err, true) {
>  		err = i915_gem_object_lock(vma->obj, &_ww);
> -- 
> 2.32.0

-- 
Ville Syrjälä
Intel

  parent reply	other threads:[~2022-02-25 17:59 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-25 17:41 [Intel-gfx] [PATCH 1/2] drm/i915: Fix assert in i915_ggtt_pin Tvrtko Ursulin
2022-02-25 17:41 ` [Intel-gfx] [PATCH 2/2] dma-resv: Fix dma_resv_held Tvrtko Ursulin
2022-02-25 17:58 ` Ville Syrjälä [this message]
2022-02-28 10:23   ` [Intel-gfx] [PATCH 1/2] drm/i915: Fix assert in i915_ggtt_pin Tvrtko Ursulin
2022-02-25 23:23 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/2] " Patchwork
2022-02-25 23:25 ` [Intel-gfx] ✗ Fi.CI.SPARSE: " Patchwork
2022-02-25 23:52 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-02-26 23:20 ` [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=YhkY2dxBDnUG6tQV@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=Intel-gfx@lists.freedesktop.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=tvrtko.ursulin@linux.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