Resizeable Bar Support on the Raspberry Pi

https://news.ycombinator.com/rss Hits: 13
Summary

While not an absolute requirement for modern graphics card support on Linux, Resizeable BAR support makes GPUs go faster, by allowing GPUs to throw data back and forth on the PCIe bus in chunks larger than 256 MB. In January, I opened an issue in the Raspberry Pi Linux repo, Resizable BAR support on Pi 5. Unlike most PCs with a BIOS or UEFI support, the Raspberry Pi should just support BAR resize by default. However, when testing Intel Xe GPU drivers (for Alchemist/Battlemage GPUs) on Raspberry Pi OS, I would get errors like: # On the Arc A750 [ 10.099135] xe 0000:03:00.0: [drm] Failed to resize BAR2 to 8192M (-ENOSPC). Consider enabling 'Resizable BAR' support in your BIOS # On the Arc B580 [ 4.795416] xe 0001:03:00.0: [drm] Failed to resize BAR2 to 16384M (-ENOSPC). Consider enabling 'Resizable BAR' support in your BIOS After some firmware updates, Pi OS was able to structure the PCIe bus correctly, but the Intel drivers still wouldn't cleanly resize the BAR. Through a lot of debugging between Pi OS devs (thanks especially to P33M and 6by9) and the wider Pi community, we discovered a way to get resizable BAR working with the Xe drivers: How to enable Resizable BAR Well, I should say 'sorta' — because for now, you have to pick a BAR size to resize to, and configure that for the Xe driver as well. First, for reference, here's a mapping of bit values to BAR sizes for the resource2_resize option we'll use later: Bit / Size Bit / Size Bit / Size 1 = 2MB2 = 4MB3 = 8MB4 = 16MB5 = 32MB 6 = 64MB7 = 128MB8 = 256MB9 = 512MB10 = 1GB 11 = 2GB12 = 4GB13 = 8GB14 = 16GB15 = 32GB I chose an 8GB BAR, as that's what the A750 asked for in the error message (Failed to resize BAR2 to 8192M). To get the resize to work (assuming you have the Xe driver already installed, which currently requires a custom kernel build on the Pi): Blacklist the Xe driver so it won't load until the BAR has been resized: edit /etc/modprobe.d/raspi-blacklist.conf and add blacklist xe Edit /boot/firmware/cmdlin...

First seen: 2025-10-17 12:52

Last seen: 2025-10-18 00:55