Non-coherent (streaming) contig-dma?
Hi,
I know certain approaches had been tried to allow use of streaming DMA (dma_map_single() etc. - i.e., not coherent) in the media drivers, is there something which can be used at this point (for MMAP method)?
Coherent buffers on many systems are very slow (uncacheable), should i simply add/replace the necessary calls in dma-contig?
Any other options?
Is there any potential problem there?
Signature · 4 lines
Krzysztof Halasa Industrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland
Quoted 6 lines · Krzysztof Hałasa
Hi,
I know certain approaches had been tried to allow use of streaming DMA (
dma_map_single()etc. - i.e., not coherent) in the media drivers, is there something which can be used at this point (for MMAP method)?
Quoted 6 lines
Coherent buffers on many systems are very slow (uncacheable), should i simply add/replace the necessary calls in dma-contig?
Any other options?
Is there any potential problem there?
I don't think there's a really good solution to the problem in upstream.
For what it's worth, the USERPTR buffers are allocated non-coherent, and the cache is flushed when that's needed.
I have a patchset that makes it driver-selectable whether to request coherent or non-coherent memory. I haven't had time to work on that for a while, unfortunately, that work stalled in fixing a few drivers that access the buffers using the CPU as well when they really should not do that.
I sent the set here under the subject "[RFC RESEND 00/11] vb2: Handle user cache hints, allow drivers to choose cache coherency" last September.
If you don't need to access the buffers using the CPU, you could avoid flushing the cache as well, but it requires patches from that set as well.
Signature · 4 lines
Kind regards, Sakari Ailus e-mail: [email protected] XMPP: [email protected]
Quoted 2 lines · Sakari Ailus
I sent the set here under the subject "[RFC RESEND 00/11] vb2: Handle user cache hints, allow drivers to choose cache coherency" last September.
Thanks, I will look at this.
Unfortunately, I need CPU access to the buffers, it's just that coherent RAM is way too slow on ARM.
Signature · 4 lines
Krzysztof Halasa Industrial Research Institute for Automation and Measurements PIAP Al. Jerozolimskie 202, 02-486 Warsaw, Poland