I’m developing video streaming application, one important part is video processing.
I use Argus framework to capture video. All the frame processing is done in GPU, so, I want to minimize data transfers as much as possible.
I’m able to access NvBufer from CPU via NvBufferMemMap and NvBufferMemSyncForCpu, but it requires data transfer (convert cv::Mat to cv::cuda::GpuMat).
The second option is to create EGLImage via NvEGLImageFromFd, but as far as I understand this requires data copy from DMA buffer.
I also found NvBufferMemSyncForDevice, but I doesn’t work as I expect (it can’t be used to access data from GPU like it can be done from CPU via NvBufferMemSyncForCpu).
I also found this topic, but there was no direct solution to this problem.
As far as I know, Jetson Nano shares the same physical memory for CPU and GPU, so it seems like there is no fundamental limitation to directly map DMA buffer to GPU.