-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Resizable BAR support on Pi 5 #6621
Comments
Transferred to Linux because the kernel does the full PCIe RC setup. |
Resizeable BARs are an endpoint feature and no special handling by the RC is required. "Resizable BAR support" in an x86 BIOS merely ensures that the window for 64bit PCI BARs is above some high address boundary and makes it enormous, so resized BARs can allocate in this space. BCM2712 (and to a lesser extent BCM2711) support multiple outbound windows at adjustable base addresses. In the DT, we have this for PCIEx1:
14GB should be enough for anybody. An 8GB allocation would range from PCI address Please post the full output of |
Regular lspci output for the GPU:
Nota bene:
|
Full Click to expand full output
It was attempting to resize BAR 2 and failed (see details in expanded view above):
|
Also... potentially related? PCI: endpoint: Add support for resizable BARs |
Those patches are for a controller operating at the other end of a link, in response to a BAR resize configuration request. Does the Arc card get resized BARs if directly connected (not through a switch)? |
@P33M - Good to know. I'm testing (on my setup) directly connected to the FFC, with no switch involved: |
Same behaviour for the A380 card, so probably something "in general". |
The card integrates PCI switches to separate the HDMI audio function from the GPU function. Not strictly necessary - you can have multiple functions on a single endpoint, but it's a valid design decision. So why can't the kernel unwind the bridge range allocation then reserve 8GB for a GPU BAR? |
It seems to be using standard PCIe functionality: linux/drivers/gpu/drm/i915/gt/intel_region_lmem.c Lines 32 to 48 in 6d16e47
Just as a note, too — I saw in some other error reports the driver trying to resize to 16GB ( I should hopefully have a B580 to test soon, as well. I'm interested to see if the code path for that card is any different since it's a generation newer. |
The address map for BCM2712 has 16GB allocated to each RC. An 8GB BAR should be supportable, but a 16GB one definitely won't fit, as the reservations for the other BARs will conflict. |
Adding requested details for A380 (6GM VRAM) and A770 (16GB VRAM). The A770 seems to request 16GB while the A380 (which only has 6GB VRAM) requests 8GB BAR when running on a Pi5 with 8GB RAM, maybe a XE driver bug too? A380 A770 |
I was recently trying to get an Intel Arc GPU running on my Pi 5 (see geerlingguy/raspberry-pi-pcie-devices#510), but one notice I recieved while testing recommended enabling Resizable BAR, or ReBAR, in my BIOS:
Obviously the Pi doesn't have a traditional BIOS, but I know at least on my Ampere-based arm64 workstations, their board firmware does support Resizable BAR, so it's definitely not a limitation of x64/amd64 vs arm64...
This may seem like a silly question, but with
amdgpu
drivers working very reliably now (even with current-gen workstation cards), and Intel coming up, it would be nice at least for graphics drivers to have this feature, as the use is also attempted by theamdgpu
drivers.I figure it can't hurt to ask, even if the answer is 'no' ;)
The text was updated successfully, but these errors were encountered: