On Tue, 14 Feb 2012 22:09:15 +0100, Ben Widawsky <b...@bwidawsk.net> wrote: > Extend the flag parameter to support the context id (from the create > IOCTL) so that userspace can associate a context with the batchbuffer. > > Signed-off-by: Ben Widawsky <b...@bwidawsk.net>
> @@ -1270,6 +1272,14 @@ i915_gem_do_execbuffer(struct drm_device *dev, void > *data, > > exec_start = batch_obj->gtt_offset + args->batch_start_offset; > exec_len = args->batch_len; > + > + if (ring->last_context) { > + context = i915_get_context(file, ctx_id); Add code here to handle context == NULL and erroring out, since i915_switch_context() just BUG_ONs. > + ret = i915_switch_context(ring, context, &seqno); > + if (ret) > + goto err; > + } > +
pgp9xf9Kuh6Mi.pgp
Description: PGP signature
_______________________________________________ Intel-gfx mailing list Intel-gfx@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx