[PATCH v2] drm/vgem: Pin our pages for dmabuf exports

Chris Wilson chris at chris-wilson.co.uk
Fri Jun 23 11:17:43 UTC 2017


Quoting Daniel Vetter (2017-06-23 12:02:53)
> On Thu, Jun 22, 2017 at 02:46:17PM +0100, Chris Wilson wrote:
> > +     /* Flush the object from the CPU cache so that importers can rely
> > +      * on coherent indirect access via the exported dma-address.
> > +      */
> >       drm_clflush_pages(pages, n_pages);
> 
> Just spotted this, but at least on x86 dma is supposed to be coherent.
> We're the exception. But then this is all ill-defined with dma_buf, so
> meh.

It's been a running debate on whether these are meant to be WC mapped or
not. dmabuf does have its sync ioctls that do allow us to mix WB for
clients and UC for device, which for us is very important. But there are
a few edge cases like device importing pages from a dmabuf as above.
-Chris


More information about the dri-devel mailing list