[Intel-gfx] [PATCH 08/11] drm/i915/context: extend contexts to execbuffer2

Jesse Barnes jbarnes at virtuousgeek.org
Fri Feb 17 19:03:23 CET 2012


On Wed, 15 Feb 2012 21:00:16 +0100
Ben Widawsky <ben at bwidawsk.net> wrote:

> On Wed, 15 Feb 2012 11:55:56 -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>
> > 
> > >  /** Resets the SO write offset registers for transform feedback on gen7. */
> > >  #define I915_EXEC_GEN7_SOL_RESET	(1<<8)
> > > +#define I915_EXEC_CONTEXT_MASK		(((1<<22)-1) << 9)
> > 
> > Instead of stuffing a context id into a subset of flags, could we just
> > use a uint32_t context id in half of rsvd1?  Yeah, having over 1 << 22
> > contexts is crazy, but this just seems to eat up all the rest of the
> > flags for no reason and then we'll have to carve out of rsvd1 for the
> > next flag.
> 
> Sure. I didn't know if rsvd fields were allowed to be used, and I was too lazy
> to check libdrm history to see if they'd always been zero'd out.
> 
> So yes, I will update this.

Yeah it's ok to use them.  We added them for just this purpose iirc,
and even tried to make sure we could use them in the future by making
sure old (then current) userspace zeroed them out.

-- 
Jesse Barnes, Intel Open Source Technology Center
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20120217/8a3df2ba/attachment.sig>


More information about the Intel-gfx mailing list