Can xHCI USB controller create isochronous endpoints for DMA to GPU memory instead of system RAM?

So is it possible that a xHCI USB controller connected to PCIe have access to RTX 3080 TI GPU memory?

Basically a custom driver which can tell xHCI to access RTX 3080 TI GPU memory?

The xHCI can implement isochronous endpoints for DMA to access system RAM directly without CPU intervention.

Thus, can the xHCI USB controller create a DMA endpoint with the GPU memory instead of the system memory?

I will create a custom driver for the xHCI USB host controller but just wanted to know if the Nvidia RTX 3080 TI GPU is capable in creating pinned GPU memory (it’s own GPU memory and not system CPU RAM) which can be accessed by arbitrary PCIe devices via DMA.

Thanks.

The general method for direct exchange between GPU device memory and another (non-GPU) PCIE device is to use GPUDirect RDMA (GDR). The non-GPU device is typically a network adapter, although there are folks who have connected e.g. FPGA devices. For a non-NVIDIA network adapter or other PCIE device you would have to get a driver from somewhere else or write your own driver.

I’ve never heard of anyone trying to write a GDR driver for a USB controller or device or endpoint, but someone may have done it. I wouldn’t be able to provide a recipe or answer questions about it.

GDR is not supported on all NVIDIA GPUs. The published statement is that:

GPUDirect RDMA is available on both Tesla and Quadro GPUs.

A RTX 3080 does not fit that description.

1 Like

Hello Robert_Crovella,


Thank you very much for your response, much obliged.

With your clarification, I can now move forward with using other DMA methods which might be more practical since RDMA is not feasible for me as my GPU doesn’t support it.

Anyhow, how about I create pinned memory in the system host RAM using CUDA cudaMallocHost() or cudaHostAlloc(), I then tell the xHCI USB host controller to directly dump frames into the host RAM pinned memory location, thus the GPU can now copy directly from the host RAM pinned memory location and perform GPU computation?

I basically want a USB MJPEG webcam to dump its data frames directly to the GPU without having the CPU being involved in doing too many buffer copies or involvement to have it reach the GPU.

Thanks again.

Yes, I think that should work.

1 Like