On Wed, 15 Feb 2012 12:16:20 -0800 Eric Anholt <eric at anholt.net> wrote: > On Tue, 14 Feb 2012 22:09:15 +0100, Ben Widawsky <ben at 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 <ben at 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; > > + } > > + Nice catch. This was the result of a last minute code change (context was already found prior to this function in the original code). Fixed. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 490 bytes Desc: not available URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120305/14cf7389/attachment.pgp>