On Wed, Feb 08, 2012 at 11:36:22PM +0000, Chris Wilson wrote: > On Thu, 9 Feb 2012 00:19:31 +0100, Ben Widawsky <ben at bwidawsk.net> wrote: > > Mostly copied from i915 gtt mmaps, this will properly fault in pages as > > the user tries to use them. The only thing of note are that no > > prefaulting occurs, so perhaps some kind of madvise will happen later if > > needed. > > What's the goal here? Why not copy the simpler (from the driver > perspective) CPU mmaps? I presume that this will be required for dmabuf > in some form?
Yeah, for proper instead of hacked-up dma_buf mmap support I expect that the expoerter needs to provide some sort of vm_insert_pfn_from_dma_buf function. We need this so that non-coherent dma_buf objects can fake coherency and also to allow (eventually) eviction. For that the exporter needs to be able to handle page-faults, so I've figured we might want to hack something together. I know it's not a beauty, because drm isn't a fs yet ;-) -Daniel -- Daniel Vetter Mail: daniel at ffwll.ch Mobile: +41 (0)79 365 57 48