Skip to content

RFC uio: Add dmabuf import ioctl

Hyun Kwon dri-devel linux-arm-kernel linux-media lkml 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 RFC Latest1 patch 9 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/1uio: Add dma-buf import ioctlsdrivers/uio/Makefile drivers/uio/uio.c drivers/uio/uio_dmabuf.c +2 more+313 -19 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH RFC 0/1] uio: Add dmabuf import ioctl

Hi,

I'm looking to enable platform independent device driver stacks on Linux. Currently, I have some driver built on top of Linux UIO [1], and possibly there can be more of such drivers: ex, soft IP drivers programmed on FPGA. Some device includes data movers such as DMA, and that requires some mechanism to import external buffers and program the data movers from user space.

Thus this patch set adds a couple of ioctls to import the dmabuf and return required information back to user. This allows the user drivers to use dmabuf compatible external buffers: ex, it's tested with ION allocator.

I'd like to understand if this is right approach which can be used to develop the user space software stacks further, especially because
- adding new ioctls to generic uio
- security concerns from exposing low level information: dma addr For example, vfio isn't option as iommu may not be available for all such devices on all platforms. So any feedback to move forward would be appreciated.

Thanks,
-hyun

[1] https://patchwork.kernel.org/patch/10774761/

Hyun Kwon (1):
uio: Add dma-buf import ioctls

 drivers/uio/Makefile         |   2 +-
 drivers/uio/uio.c            |  43 +++++++++
 drivers/uio/uio_dmabuf.c     | 210 +++++++++++++++++++++++++++++++++++++++++++
 drivers/uio/uio_dmabuf.h     |  26 ++++++
 include/uapi/linux/uio/uio.h |  33 +++++++
 5 files changed, 313 insertions(+), 1 deletion(-)
 create mode 100644 drivers/uio/uio_dmabuf.c
 create mode 100644 drivers/uio/uio_dmabuf.h
 create mode 100644 include/uapi/linux/uio/uio.h
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel