[bug report] drm/ttm: add transparent huge page support for DMA allocations v2

Koenig, Christian Christian.Koenig at amd.com
Thu Jun 27 17:30:00 UTC 2019


Am 27.06.19 um 19:15 schrieb Christoph Hellwig:
> On Thu, Jun 27, 2019 at 05:12:47PM +0000, Koenig, Christian wrote:
>> the whole TTM page allocation code is not really working that well.
>>
>> How do we then do things like mapping that memory to userspace?
> dma_mmap_attrs with the same flags as passed to dma_alloc_attrs

We need a way to map only a fraction of a VMA on a page fault.  Of hand 
I don't see that possible with dma_mmap_attrs().

>> And how to we control caching, write combine/back of that memory?
> By using the flags passed to the functions, with the slight caveat
> that a lot of the options are only implemented on some architectures.
>
> Documentation/DMA-attributes.txt documents the available flags.

The problem is that I see quite a bunch of functions which are needed by 
GPU drivers and are not implemented in the DMA API.

For example we need to be able to setup uncached mappings, that is not 
really supporter by the DMA API at the moment.

Additional to that we need a way to force a coherent mappings with 
dma_map_page() which fails when this isn't guaranteed.

Regards,
Christian.


More information about the dri-devel mailing list