This directory contains a minimal proof-of-concept (POC) demonstrating:
- Allocation of a NVIDIA buffer object using the NVIDIA kernel driver.
- Export of that buffer object as a file descriptor (fd).
- Import of the fd into the NVIDIA DRM driver as a GEM object.
- Export of the GEM object as a DMA-BUF fd.
- Inter-process sharing: one process allocates and exports, another imports and reads.
exporter.c: Allocates and exports the buffer, sends the DMA-BUF fd to another process.importer.c: Receives the DMA-BUF fd, maps and reads the buffer.fd-passing.h/c: Helper for passing fds over UNIX domain sockets.Makefile: Build instructions.
- NVIDIA proprietary driver and access to
/dev/nvidia*and/dev/dri/renderD*. - Root or appropriate permissions.
- Build:
make - Run exporter in one terminal:
./exporter - Run importer in another terminal:
./importer