[Intel-gfx] [PATCH v2 3/5] drm/i915: Introduce DRM_I915_GEM_MMAP_OFFSET
Chris Wilson
chris at chris-wilson.co.uk
Mon Oct 7 20:17:52 UTC 2019
Quoting Chris Wilson (2019-10-07 21:16:29)
> Quoting Bloomfield, Jon (2019-10-07 17:55:16)
> > > -----Original Message-----
> > > From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of Abdiel
> > > Janulgue
> > > Sent: Monday, October 7, 2019 2:19 AM
> > > To: intel-gfx at lists.freedesktop.org
> > > Cc: Auld, Matthew <matthew.auld at intel.com>
> > > Subject: [Intel-gfx] [PATCH v2 3/5] drm/i915: Introduce
> > > DRM_I915_GEM_MMAP_OFFSET
> > >
> > > This is really just an alias of mmap_gtt. Add a new CPU mmap
> > > implementation that allows multiple fault handlers that depends on
> > > the object's backing pages.
> > >
> > > Note that we multiplex mmap_gtt and mmap_offset through the same ioctl,
> > > and use the zero extending behaviour of drm to differentiate between
> > > them, when we inspect the flags.
> > >
> > > Signed-off-by: Abdiel Janulgue <abdiel.janulgue at linux.intel.com>
> > > Signed-off-by: Matthew Auld <matthew.auld at intel.com>
> > > Cc: Joonas Lahtinen <joonas.lahtinen at linux.intel.com>
> > > ---
> > > drivers/gpu/drm/i915/gem/i915_gem_mman.c | 36 +++++++++++++++++--
> > > .../gpu/drm/i915/gem/i915_gem_object_types.h | 3 ++
> > > drivers/gpu/drm/i915/i915_drv.c | 2 +-
> > > include/uapi/drm/i915_drm.h | 28 +++++++++++++++
> > > 4 files changed, 66 insertions(+), 3 deletions(-)
> >
> > How does the label 'offset' fit into this API if it's really about multiple fault handlers?
> > Could do with a much better description here I think. Who would use this, and why, would help a lot.
>
> The ioctl returns the offset into the device fd userpace uses with
> mmap(2). Hence DRM_IOCTL_I915_GEM_MMAP_OFFSET.
Yeah, that should have been explained in the changelog why the name was
chosen to reflect expected usage.
-Chris
More information about the Intel-gfx
mailing list