[Intel-gfx] [PATCH 2/2] drm/i915: Disable page-faults around the fast pwrite/pread paths

Eric Anholt eric at anholt.net
Sun Jul 10 20:45:29 CEST 2011


On Sat, 09 Jul 2011 13:24:02 -0700, Keith Packard <keithp at keithp.com> wrote:
> On Sat,  9 Jul 2011 09:38:51 +0100, Chris Wilson <chris at chris-wilson.co.uk> wrote:
> 
> > +		/* We have to disable faulting here in case the user address
> > +		 * is really a GTT mapping and so we can not enter
> > +		 * i915_gem_fault() whilst already holding struct_mutex.
> > +		 */
> 
> I would (far, far) rather disallow pread through the GTT
> mapping. There's no credible reason to allow it. Is there some
> reasonably fast way to detect that these addresses are within the GTT
> and just bail?

That means that I can't give users of GL pointers to GTT mappings for
the buffer mapping API, because then I'd have to check in userland
whether the pointer they give me for other API entrypoints is to a known
GTT mapping before doing a pread into it.  And then I imagine cross-API
interactions and shudder.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110710/291674c7/attachment.sig>


More information about the Intel-gfx mailing list