Replies: 7 comments 37 replies
-
|
Oh my! Great work, and I think you should also check out the discussion in #754 and #755 — and I'd like to loop in @Coreforge, @RSC-Games, @pauld-gh, and @lts-rad who will also be very interested... I will definitely try to validate the patches on my end too, once I'm back in the studio, this is exciting to see! |
Beta Was this translation helpful? Give feedback.
-
|
That's neat it works with that little change. Setting the caching to |
Beta Was this translation helpful? Give feedback.
-
|
@yanghaku have you published a PR, a fork of the open-gpu-kernel-modules repo, or the patch set for it anywhere? I'd love to test your patch on the 3080 Ti I have here on a Pi. Will test one or two of my AMD GPUs again soon, too. |
Beta Was this translation helpful? Give feedback.
-
|
@yanghaku - I've tested your AMDGPU patch with a 7900 XT 20GB card on a Pi 5 and wow, almost everything I've tested works right out of the gate, no other tweaks necessary. See my testing results here: #763 The one thing I've had some trouble with is some Steam games launching, but that's adding on a bunch more complexity on top of the driver stack, so I can't blame it on any driver issues in particular yet. But wow, what a much easier approach, just a few lines changed :D And the 7900 XT 20 GB card is a pretty good performer for the money, though efficiency isn't the best. At least it's readily available under $700. |
Beta Was this translation helpful? Give feedback.
-
|
So looking at the patch here... it appears to be a patch to the drm code itself, rather than to |
Beta Was this translation helpful? Give feedback.
-
|
Has anyone tested these changes on an LTS kernel? Home Assistant uses 6.12 and it'd be great to use this tiny patch instead. I wonder though, how does this actually solve the alignment problem, as opposed to just the coherency problem? |
Beta Was this translation helpful? Give feedback.
-
|
Also of interest to anyone following these topics, @mariobalanica published a set of arm-pcie-gpu-patches specifically geared towards the RK3588 (tested on a Radxa Rock 5B board), which at least has an RX580 working — it looks like there are some BAR adjustments needed on that platform, but one thing that was demonstrated was early boot screens working with UEFI support via AMD's aarch64 GOP driver... See Twitter thread with some more screenshots and details: https://x.com/mariobalanica/status/1977826099104243980 Not sure if that patchset will work on RK3588 with AMD GPUs with more than 4 GB of VRAM though? |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello @geerlingguy ,
Thank you so much for your useful and awesome work! For my research work, I was greatly inspired by your open-source AMD GPU driver patch. Through this, I discovered that the root cause is that most ARM SoCs lack I/O coherence, while many PCIe device drivers (such as the AMD GPU driver) are primarily designed for x86 platforms and implicitly assume DMA coherence in certain implementations.
Based on this finding, I have successfully enabled both AMD and NVIDIA GPU support on Raspberry Pi 5B in our tests.
AMD GPU (Sapphire RX 460 OC 4 GB)
My Patch
This is my simpler patch on the AMD GPU driver based on Linux raspberrypi 6.15.0, there are just two changes:
kmapcalls with unifiedvmaplogic in memory managementpgprot_dmacoherent()for ARM64 architecturesExperimental setup
AMD GPU (Sapphire RX 460 OC 4 GB) on a Raspberry Pi 5 with the 52Pi PCIe x1 Slot HAT :
Then I connected PCIe TO 2-CH PCIe HAT and PCIe to USB3.2 Gen1 Board to support more usb devices:
Results
dmesglog about amdgpu:lspci:vulkaninfo,glxinfoandglxgearswith X11 display:glxgearsDisplay on screen:NVIDIA GPU (GeForce RTX 3090)
My Patch
I modified Nvidia Open-Source driver for Linux raspberrypi 6.15.0, The patch is a bit complicated, involving multiple files.
Experimental setup
To use a more stable high-power PCIe slot for the power supply, we used an OCuLink GPU Dock, the product is ADT-Link F9G-BK7-F9934-F4C, connected to the Raspberry Pi via the Raspberry Pi M.2 HAT+
Results
dmesglog about nvidia gpu:nvidia-smiandlspci:vulkaninfo,glxinfoandglxgearswith X11 display:glxgearsDisplay on screen:Some CUDA Samples:
Run a LLM (use mlc-chat):
This
nvidia-smiresult when running the LLM above:nvidia-smi and lspci on version 570.133.07 (an old picture):
Beta Was this translation helpful? Give feedback.
All reactions