Re: [Intel-gfx] [PATCH 01/17] drm/i915: Add a sw fence for collecting up dma fences

2016-08-30 Thread Joonas Lahtinen
On ma, 2016-08-29 at 16:45 +0100, Chris Wilson wrote: > On Mon, Aug 29, 2016 at 04:43:04PM +0300, Joonas Lahtinen wrote: > > > > On su, 2016-08-28 at 21:46 +0100, Chris Wilson wrote: > > > +  * (and so added to the list to be woken). > > > +  */ > > > + > > > + smp_mb__before_spinlock(); > > > + s

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Add a sw fence for collecting up dma fences

2016-08-29 Thread Chris Wilson
On Mon, Aug 29, 2016 at 04:43:04PM +0300, Joonas Lahtinen wrote: > On su, 2016-08-28 at 21:46 +0100, Chris Wilson wrote: > > +static void __i915_sw_fence_wake_up_all(struct i915_sw_fence *fence, > > + struct list_head *continuation) > > +{ > > + wait_queue_head_t

Re: [Intel-gfx] [PATCH 01/17] drm/i915: Add a sw fence for collecting up dma fences

2016-08-29 Thread Joonas Lahtinen
On su, 2016-08-28 at 21:46 +0100, Chris Wilson wrote: > +static void i915_sw_fence_free(struct kref *kref) > +{ > + struct i915_sw_fence *fence = container_of(kref, typeof(*fence), kref); > + > + WARN_ON(atomic_read(&fence->pending) > 0); > + > + if (fence->flags & I915_SW_FENCE_MASK) >

[Intel-gfx] [PATCH 01/17] drm/i915: Add a sw fence for collecting up dma fences

2016-08-28 Thread Chris Wilson
This is really a core kernel struct in disguise until we can finally place it in kernel/. There is an immediate need for a fence collection mechanism that is more flexible than fence-array, in particular being able to easily drive request submission via events (and not just interrupt driven). The s