[Intel-gfx] [RFC] drm/i915: Android native sync support

Chris Wilson chris at chris-wilson.co.uk
Thu Jan 22 05:49:15 PST 2015


On Thu, Jan 22, 2015 at 01:41:48PM +0000, Tvrtko Ursulin wrote:
> 
> On 01/22/2015 11:42 AM, Chris Wilson wrote:
> >>+	if (args->flags & I915_EXEC_FENCE_OUT) {
> >>+		ret = i915_create_sync_fence_ring(ring, ctx,
> >>+						  &sync_fence, &fence_fd);
> >>+		if (ret)
> >>+			goto sync_err;
> >>+	}
> >>+
> >>  	ret = dev_priv->gt.do_execbuf(dev, file, ring, ctx, args,
> >>  				      &eb->vmas, batch_obj, exec_start, flags);
> >
> >You emit the fence prior to the execution of the batch? Interesting. Not
> >exactly where I would expect the fence. Both before/after are
> >justifiable.
> 
> What do yo consider emitting? To me that is fd_install and that
> happens after request was successfully submitted. I thought it is
> tidier to set up required objects before and then install the fence,
> or discard it, depending on the outcome. You think differently?

i915_create_sync_fence_ring() inserts a breadcrumb into the ring that
fires before we execute the execbuf (which then gets its own request +
breadcrumb).

I believe the intention is to hook the fence into the breadcrumb that
fires after the execbuf, i.e. to add it to the execbuf request rather
than create a new request all for itself.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list