[Intel-gfx] [PATCH 18/21] drm/i915: Split out i915_gem_object_move_to_ring() from execbuffer

Daniel Vetter daniel at ffwll.ch
Sat Apr 16 16:24:27 CEST 2011


On Sat, Apr 16, 2011 at 03:18:46PM +0100, Chris Wilson wrote:
> On Sat, 16 Apr 2011 15:54:56 +0200, Daniel Vetter <daniel at ffwll.ch> wrote:
> > On Sat, Apr 16, 2011 at 10:17:42AM +0100, Chris Wilson wrote:
> > > As we can make use of the ability to insert semaphores to serialise
> > > accessing buffers between ring elsewhere, separate out the function from
> > > the execbuffer code and make it generic.
> > 
> > Perhaps add a small note somewhere that move_to_ring now does the right
> > thing when to == NULL (falling back to wait_rendering). I've hunted around
> > a bit for that ...
> 
> /**
>  * Serialise an object between rings: wait for it to complete on the first
>  * ring, before it can be used on the next.
>  *
>  * If the object is staying on the same ring, this is a no-op.
>  *
>  * If the object is not currently on a ring, this is a no-op.
>  *
>  * If the object is moving off a ring (i.e. to == NULL), then we wait for
>  * rendering to complete entirely.
>  *
>  * The interesting case is when we move between two different rings. On
>  * pre-SandyBridge hw, we have no choice but to wait until rendering has
>  * finished. SandyBridge, however introduces the GPU semaphore which we
>  * can use to cause one ring to wait upon the signal of another - avoiding
>  * the CPU stall.
>  *
>  * We assume that the caller has emitted all required flushes.
>  */
Perfect!
-Daniel
-- 
Daniel Vetter
Mail: daniel at ffwll.ch
Mobile: +41 (0)79 365 57 48



More information about the Intel-gfx mailing list