[Intel-gfx] [PATCH] drm/i915: Allow userptr backchannel for passing aroung GTT mappings

Chris Wilson chris at chris-wilson.co.uk
Tue Apr 7 03:22:10 PDT 2015


On Tue, Apr 07, 2015 at 10:53:20AM +0200, Daniel Vetter wrote:
> On Thu, Apr 02, 2015 at 04:04:14PM +0100, Chris Wilson wrote:
> > Once userptr becomes part of client API, it is almost a certainly that
> > eventually someone will try to create a new object from a mapping of
> > another client object, e.g.
> > 
> > new = vaImport(vaMap(old, &size), size);
> > 
> > (using a hypothethical API, not meaning to pick on anyone!)
> > 
> > Since this is actually fairly safe to implement and to allow (since it
> > is within a single process space and the memory access passes the
> > standard permissions test) let us not limit the Client possibilities.
> > 
> > Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> > Cc: Gwenole Beauchesne <gwenole.beauchesne at intel.com>
> > Cc: MichaƂ Winiarski <michal.winiarski at intel.com>
> > Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> 
> Thus far all the apis are very explicit in stating that you can only slurp
> in anything that's allocated with malloc and friends. Also usually this
> means we're dealing with tiled memory which looks linear, so I'm not sure
> how this will work.

The user doesn't know the object it tiled, all they have is a linear
mapping. The kernel doesn't care either, all it sees is a bo. The idea
is to simply enable a likely usecase that just works.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list