True DMABUF support
Now that the sources are no longer restricted from using GPL symbols, can we please have true Linux DMABUF import support?
Currently NVIDIA reports EGL_EXT_image_dma_buf_import however this is not true DMABUF support according to the Linux gfx documentation for DMABUF. Instead the driver is using some internal proprietary format that makes it impossible to use a DMABUF provided by another driver, such as Intel/AMD or some other external device like a capture card or even just local system RAM.
In the past NVIDIA have made several attempts to get true DMABUF support into the kernel which was rejected due to the GPL symbols being unavailable to them, see:
https://www.phoronix.com/scan.php?page=news_item&px=MTIwNDI https://www.phoronix.com/scan.php?page=news_item&px=MTA1OTU
This would greatly benefit projects like Looking Glass where we are importing full screen textures directly from memory shared with a VM which is writing into the shared memory.
Note: This is already working on AMD and Intel GPUs . Currently we recommend against using NVidia GPUs to our user base due to the lack of this feature.
See our kernel module here where we create a valid DMABUF from shared RAM: https://github.com/gnif/LookingGlass/tree/master/module
REALLY WANT THIS!!!!!
+1
+∞
Hello, Are you sure is not already the case? , the GPL function mentioned in the Phoronix article is used. https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/kernel-open/nvidia/nv-dmabuf.c#L721
https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/kernel-open/nvidia/nv-dmabuf.c#L739
you can see the use of the GPL function.
Hello, Are you sure is not already the case? , the GPL function mentioned in the Phoronix article is used.
https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/kernel-open/nvidia/nv-dmabuf.c#L721
https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/kernel-open/nvidia/nv-dmabuf.c#L739
you can see the use of the GPL function.
Yes, it will create a DMABUF for export, but will not use one from another source for import. You can see that it's not even implemented as an IOCTL, only export is, see:
https://github.com/NVIDIA/open-gpu-kernel-modules/blob/d8f3bcff924776518f1e63286537c3cf365289ac/kernel-open/nvidia/nv.c#L2339
The proprietary closed driver has an import implemented, but only if the fd used came from the same kernel module, it does not allow import from other sources. The symbol that is needed to be used is dma_buf_get which is only used once in this code base to check if there is a duplicate DMABUF before creating a new one for export.