[Intel-gfx] [PATCH 3/6] drm/i915: Support write only mappings

Ben Widawsky ben at bwidawsk.net
Tue Sep 20 07:37:45 CEST 2011


On Mon, Sep 19, 2011 at 10:29:15PM -0700, Keith Packard wrote:
> On Mon, 19 Sep 2011 21:25:03 -0700, Ben Widawsky <ben at bwidawsk.net> wrote:
> > When doing a GTT mapping, the pages are not backed until taking a fault.
> > If we know that the object is write only, when the fault happens we do not need
> > to make the pages coherent with the CPU.  This allows for semi fast prefaults
> > to occur in libdrm at map time.
> 
> Every time I see this stuff, I get confused by the term
> 'write-only'. Reading through the code, I remind myself that what you're
> actually promising is that any CPU accesses to the object will not
> overlap any potential writes by the GPU. The CPU could be reading or
> writing, it really doesn't matter.

I think of it as, we (libdrm + kernel) promise that the buffer is not
guaranteed to be coherent with the GPU. Mesa/client is who should be
making the promise to not write to a part of the buffer that the GPU may
be accessing.
> 
> Really what you want is a kernel call that does everything except block
> on the GPU, right?

Yes, exactly.

Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20110920/7c7961da/attachment.sig>


More information about the Intel-gfx mailing list