Trying to Get an Nvidia GPU to Work with Raspberry Pi CM4
gist.github.com
gist.github.com
First, to show that you can plug in a GPU (in this case an older one, but still passable) and have it recognized by the Pi Compute Module 4.
Second, to mention that it seems the BAR (Base Address Register) space allocated to PCIe on the Pi 4 is not adequate for even an older GPU like this one.
Some people have suggested some GPUs may work but with much reduced bandwidth due to the x1 lane on the PCIe 2.0 bus on the Pi 4, but so far from all the fruitless searches I've done, anyone using any of the Cortex A series chips seems to be bumping into the same problem (BAR memory allocation problems due to lack of space) and nobody else seems to have found a solution either :(
Anyways, it would be interesting to know if this is a hard limit of the Cortex A72, or something else, and if something else, whether that limit could be lifted (e.g. firmware update or OS changes).
The device tree file does contain the range of memory to use for the PCI BAR, could it be as simple as increasing that number (the last value of the 'ranges' item I think) and rebuilding it? Seems unlikely, but might be worth a go. I'm uncertain how much the device tree file is describing the actual setup of hardware, and how much is used to actually configure the hardware.
The larger issue might be the complete lack of I/O space. Again this could be added in the device tree file, but who knows if the underlying device even supports it.
This means that you may have issues with some of the higher end HBA's, etc. as well. I'd have to do some research to see what they require though.