[Intel-gfx] [RFC] libdrm_intel: Add support for userptr objects

Daniel Vetter daniel at ffwll.ch
Mon May 12 18:00:37 CEST 2014


On Fri, May 09, 2014 at 06:30:11AM +0100, Chris Wilson wrote:
> On Thu, May 08, 2014 at 05:10:24PM -0700, Ben Widawsky wrote:
> > On Wed, Feb 26, 2014 at 04:41:41PM +0000, Tvrtko Ursulin wrote:
> > > +struct drm_i915_gem_userptr {
> > > +	__u64 user_ptr;
> > > +	__u64 user_size;
> > > +	__u32 flags;
> > > +#define I915_USERPTR_READ_ONLY 0x1
> > > +#define I915_USERPTR_UNSYNCHRONIZED 0x80000000
> > > +	/**
> > > +	* Returned handle for the object.
> > > +	*
> > > +	* Object handles are nonzero.
> > > +	*/
> > > +	__u32 handle;
> > > +};
> > > +
> > 
> > Oh yeah. I want a ctx_id here as well. Chris, any objection to adding
> > this?
> 
> What for? bo are file-scoped not context-scoped.

I think what Ben actually wants is a ctx_id in the soft-pin ioctl. Makes
his mirrored ppgtt POC a 2 ioctl thing, but the resulting orthogonality of
interfaces is imo something much to be preferred. Since we still need real
bos for scanout targets and similar, and I'm going to rip everyone's head
off if we do that by shmem-mapping+userptr ;-)
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch



More information about the Intel-gfx mailing list