On Thu, Sep 05, 2019 at 07:05:43PM +0200, Thomas HellstrÃm (VMware) wrote:
I took a quick look at the interfaces and have two questions:I guess we can shift the argument checking into the fault handler.
1) dma_mmap_prepare(), would it be possible to drop the references to the
actual coherent region? The thing is that TTM doesn't know at mmap time what
memory will be backing the region. It can be VRAM, coherent memory or system
2) @cpu_addr and @dma_addr are the values pointing at the beginning of anYes.
allocated chunk, right?
The reason I'm asking is that TTM's coherent memoryFor implementations that remap non-contigous regions using vmap we need the
pool is sub-allocating from larger chunks into smaller PAGE_SIZE chunks,
which means that a TTM buffer object may be randomly split across larger
chunks, which means we have to store these values for each PAGE_SiZE chunk.
start cpu address passed, as that is used to find the vm_struct structure
for it. That being said I don't see a problem with you keeping track
of the original start and offset into in your suballocation helpers.