Hi Christian,
On 4/11/25 9:30 AM, Christian König wrote:
Hi Thomas,
Am 10.04.25 um 21:43 schrieb Thomas Petazzoni:
Hello Christian,
Thanks for your feedback!
On Thu, 10 Apr 2025 18:29:12 +0200
Christian König wrote:
Many UIO users performing DMA from their UIO device need to access the
DMA
basic operations: allocate, release, mmap and get_dma_addr.
The buffer allocation is done through dma_alloc_coherent().
Signed-off-by: Bastien Curutchet
---
drivers/uio/Kconfig| 9
drivers/uio/Makefile | 1 +
drivers/uio/uio.c | 4 ++
drivers/uio/uio_heap.c
There is no way to transmit the DMA address of a buffer to userspace.
Some UIO users need this to handle DMA from userspace.
Add a new dma_buf_ops operation that returns the DMA address.
Add a new ioctl to transmit this DMA address to userspace.
Signed-off-by: Bastien Curutchet
---
drivers/dma
has been tested with the uio_pci_generic driver on a PowerPC.
Signed-off-by: Bastien Curutchet
---
Bastien Curutchet (3):
dma-buf: Allow heap that doesn't provide map_buf/unmap_buf
dma-buf: Add DMA_BUF_IOCTL_GET_DMA_ADDR
uio: Add UIO_DMABUF_HEAP
drivers/dma-buf/dma-buf.c| 29 ++
ce before using them.
Signed-off-by: Bastien Curutchet
---
drivers/dma-buf/dma-buf.c | 8 +---
1 file changed, 5 insertions(+), 3 deletions(-)
diff --git a/drivers/dma-buf/dma-buf.c b/drivers/dma-buf/dma-buf.c
index
5baa83b855156516a0a766bee0789b122473efb3..398418bd9731ad7a3a1f12eaea6a