[Intel-gfx] [PATCH 18/21] drm/i915: Split out i915_gem_object_move_to_ring() from execbuffer
chris at chris-wilson.co.uk
Sat Apr 16 07:18:46 PDT 2011
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.
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx