On Wed, 15 Feb 2012 12:16:20 -0800
Eric Anholt <e...@anholt.net> wrote:

> 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;
> > +   }
> > +

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.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to