On to, 2017-02-02 at 09:08 +0000, Chris Wilson wrote: > A request on one engine with a dependency on a request on another engine > must wait for completion of the first request before starting. > > Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> <SNIP> > +static int live_sequential_engines(void *arg) > +{ <SNIP> > + for_each_engine(engine, i915, id) { > + long timeout; > + u32 *cmd; > + > + if (i915_gem_request_completed(request[id])) { > + pr_err("%s(%s): request completed too early!\n", > + __func__, engine->name); > + err = -EINVAL; > + goto out_request; > + } I was kinda anticipating you capture prev and always release the previous batch, doesn't add that much value necessarily, but you could make sure before releasing the batch that current has not even been started yet. That's what you mention in the commit message. > + > + cmd = i915_gem_object_pin_map(request[id]->batch->obj, > + I915_MAP_WC); > + if (IS_ERR(cmd)) { > + err = PTR_ERR(cmd); > + pr_err("%s: failed to WC map batch, err=%d\n", __func__, err); > + goto out_request; > + } > + *cmd = MI_BATCH_BUFFER_END; > + wmb(); > + i915_gem_object_unpin_map(request[id]->batch->obj); recursive_batch_release() With the helper; Reviewed-by: Joonas Lahtinen <joonas.lahtinen@xxxxxxxxxxxxxxx> Regards, Joonas -- Joonas Lahtinen Open Source Technology Center Intel Corporation _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx