Re: [Intel-gfx] [PATCH 16/22] drm/i915: Make fb_tracking.lock a spinlock

2016-07-29 Thread Chris Wilson
On Thu, Jul 28, 2016 at 12:02:01PM +0200, Daniel Vetter wrote: > On Wed, Jul 27, 2016 at 12:14:54PM +0100, Chris Wilson wrote: > > We only need a very lightweight mechanism here as the locking is only > > used for co-ordinating a bitfield. > > > > v2: Move the cheap unlikely tests into the caller

Re: [Intel-gfx] [PATCH 16/22] drm/i915: Make fb_tracking.lock a spinlock

2016-07-28 Thread Joonas Lahtinen
On ke, 2016-07-27 at 12:14 +0100, Chris Wilson wrote: > >   /* Delay flushing when rings are still busy.*/ > - mutex_lock(&dev_priv->fb_tracking.lock); > + spin_lock(&dev_priv->fb_tracking.lock); >   frontbuffer_bits &= ~dev_priv->fb_tracking.busy_bits; > - mutex_unlock(&dev_pr

Re: [Intel-gfx] [PATCH 16/22] drm/i915: Make fb_tracking.lock a spinlock

2016-07-28 Thread Daniel Vetter
On Thu, Jul 28, 2016 at 12:02:01PM +0200, Daniel Vetter wrote: > On Wed, Jul 27, 2016 at 12:14:54PM +0100, Chris Wilson wrote: > > We only need a very lightweight mechanism here as the locking is only > > used for co-ordinating a bitfield. > > > > v2: Move the cheap unlikely tests into the caller

Re: [Intel-gfx] [PATCH 16/22] drm/i915: Make fb_tracking.lock a spinlock

2016-07-28 Thread Daniel Vetter
On Wed, Jul 27, 2016 at 12:14:54PM +0100, Chris Wilson wrote: > We only need a very lightweight mechanism here as the locking is only > used for co-ordinating a bitfield. > > v2: Move the cheap unlikely tests into the caller > > Signed-off-by: Chris Wilson I think the code shuffling in here bad

[Intel-gfx] [PATCH 16/22] drm/i915: Make fb_tracking.lock a spinlock

2016-07-27 Thread Chris Wilson
We only need a very lightweight mechanism here as the locking is only used for co-ordinating a bitfield. v2: Move the cheap unlikely tests into the caller Signed-off-by: Chris Wilson --- drivers/gpu/drm/i915/i915_drv.h | 2 +- drivers/gpu/drm/i915/i915_gem.c | 2 +- drivers/