Re: [PATCH 0/3] uio/dma-buf: Give UIO users access to DMA addresses.

2025-04-11 Thread Bastien Curutchet
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

[PATCH 3/3] uio: Add UIO_DMABUF_HEAP

2025-04-10 Thread Bastien Curutchet
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

[PATCH 2/3] dma-buf: Add DMA_BUF_IOCTL_GET_DMA_ADDR

2025-04-10 Thread Bastien Curutchet
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

[PATCH 0/3] uio/dma-buf: Give UIO users access to DMA addresses.

2025-04-10 Thread Bastien Curutchet
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 ++

[PATCH 1/3] dma-buf: Allow heap that doesn't provide map_buf/unmap_buf

2025-04-10 Thread Bastien Curutchet
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