[Intel-gfx] [PATCH v2 3/5] drm/i915: Add support for CPU mapping to DRM_IOCTL_I915_GEM_MMAP_GTT

Chris Wilson chris at chris-wilson.co.uk
Wed Jan 27 08:32:43 PST 2016


On Wed, Jan 27, 2016 at 04:51:02PM +0100, Daniel Vetter wrote:
> On Wed, Jan 27, 2016 at 03:21:48PM +0000, Tvrtko Ursulin wrote:
> > From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> > 
> > This enables mapping via CPU using the proper DRM mmap API for
> > better debug (Valgrind) and implementation symmetry in the
> > driver.
> > 
> > v2:
> >  * Use normal mutex, skip domain management and pin pages. (Chris Wilson)
> >  * No need to drop struct mutex over vma_insert_pfn.
> 
> I think we still neeed that on first fault:
> 
> - userspac calls set_domain(GTT)
> - kernel does nothing since there's no binding

For GPU mmaps it would be set_domain(CPU). For WC/GTT, we already closed
that hole for precisely this reason.

However, I can accept the if the kernel shrinks between pointer accesses,
even though I don't like it. pagefault-of-doom again.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list