All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chris Wilson <chris@chris-wilson.co.uk>
To: Andi Shyti <andi@etezian.org>
Cc: intel-gfx@lists.freedesktop.org, matthew.auld@intel.com
Subject: Re: [Intel-gfx] [PATCH 5/5] drm/i915: Avoid calling i915_gem_object_unbind holding object lock
Date: Sat, 07 Dec 2019 00:20:40 +0000	[thread overview]
Message-ID: <157567804007.2300.9959810670397535928@skylake-alporthouse-com> (raw)
In-Reply-To: <20191207000327.GB1300@jack.zhora.eu>

Quoting Andi Shyti (2019-12-07 00:03:27)
> Hi Chris,
> 
> [...]
> 
> > diff --git a/drivers/gpu/drm/i915/gem/i915_gem_domain.c b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
> > index 808eb327a29b..53e28e417cc9 100644
> > --- a/drivers/gpu/drm/i915/gem/i915_gem_domain.c
> > +++ b/drivers/gpu/drm/i915/gem/i915_gem_domain.c
> > @@ -187,21 +187,23 @@ int i915_gem_object_set_cache_level(struct drm_i915_gem_object *obj,
> >  {
> >       int ret;
> >  
> > -     assert_object_held(obj);
> > -
> >       if (obj->cache_level == cache_level)
> 
> you're checking here...
> 
> >               return 0;
> >  
> > -     ret = i915_gem_object_unbind(obj, I915_GEM_OBJECT_UNBIND_ACTIVE);
> > +     ret = i915_gem_object_lock_interruptible(obj);
> >       if (ret)
> >               return ret;
> >  
> > -     /* The cache-level will be applied when each vma is rebound. */
> > +     /* Always invalidate stale cachelines */
> > +     if (obj->cache_level != cache_level) {
> 
> ... and here... you might want to get rid of this one?

One outside, one inside the lock.
-Chris
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

  reply	other threads:[~2019-12-07  0:20 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-12-06 10:55 [Intel-gfx] [PATCH 1/5] drm/i915/gem: Flush the pwrite through the chipset before signaling Chris Wilson
2019-12-06 10:55 ` [Intel-gfx] [PATCH 2/5] drm/i915: Claim vma while under closed_lock in i915_vma_parked() Chris Wilson
2019-12-06 10:55 ` [Intel-gfx] [PATCH 3/5] drm/i915/gt: Acquire a GT wakeref for the breadcrumb interrupt Chris Wilson
2019-12-06 10:55 ` [Intel-gfx] [PATCH 4/5] drm/i915/gem: Pin gen6_ppgtt prior to constructing the request Chris Wilson
2019-12-06 23:31   ` Andi Shyti
2019-12-06 23:35     ` Chris Wilson
2019-12-06 10:55 ` [Intel-gfx] [PATCH 5/5] drm/i915: Avoid calling i915_gem_object_unbind holding object lock Chris Wilson
2019-12-07  0:03   ` Andi Shyti
2019-12-07  0:20     ` Chris Wilson [this message]
2019-12-07 19:24       ` Andi Shyti
2019-12-06 11:02 ` [Intel-gfx] ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/5] drm/i915/gem: Flush the pwrite through the chipset before signaling Patchwork
2019-12-06 11:23 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2019-12-06 11:34 ` [Intel-gfx] [PATCH 1/5] " Tvrtko Ursulin
2019-12-06 22:38 ` [Intel-gfx] ✗ Fi.CI.IGT: failure for series starting with [1/5] " 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=157567804007.2300.9959810670397535928@skylake-alporthouse-com \
    --to=chris@chris-wilson.co.uk \
    --cc=andi@etezian.org \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=matthew.auld@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 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.