ikwzm / udmabuf

User space mappable dma buffer device driver for Linux.
BSD 2-Clause "Simplified" License
560 stars 168 forks source link

Q: is it possible to use same /dev/udmabuf0 device from multiple programms? #54

Closed h4tr3d closed 3 years ago

h4tr3d commented 4 years ago

Scenario is simple: shared memory implementation in case, when hardware blocks is used.

Application1 open /dev/udmabuf0, mmap it, feed buffer into V4L2 and signal Application 2.

Application 2 open /dev/udmabuf0, take some data and feed buffer into... VCU codec, for example.

In such case, we can omit extra memory coping.

ikwzm commented 4 years ago

Thank you for the issue.

u-dma-buf can be open()&mmap() simultaneously in multiple applications. u-dma-buf does not perform exclusive control in particular. Please perform exclusive control between applications.

h4tr3d commented 4 years ago

@ikwzm Thanks a lot for clarification. I understand that external inter-process locking interface is needed.