raspberry-pi-pcie-devices icon indicating copy to clipboard operation
raspberry-pi-pcie-devices copied to clipboard

Test AMD RX 7900 XT with Pi 500+

Open geerlingguy opened this issue 3 months ago • 7 comments

Image

As the title says... I had tested the XTX back before I returned it for having a defective vapor chamber in #503. Would like to see how the XT performs, as it might be the best value (bang for the buck) AMD card in 2025, if the VRAM meets your needs. It's also readily available anywhere, unlike some other model GPUs.

geerlingguy avatar Sep 22 '25 14:09 geerlingguy

pi@pi5:~ $ lspci
0001:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 30)
0001:01:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Upstream Port of PCI Express Switch (rev 10)
0001:02:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD/ATI] Navi 10 XL Downstream Port of PCI Express Switch (rev 10)
0001:03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 [Radeon RX 7900 XT/7900 XTX] (rev cc)
0001:03:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Navi 31 HDMI/DP Audio
0002:00:00.0 PCI bridge: Broadcom Inc. and subsidiaries BCM2712 PCIe Bridge (rev 30)
0002:01:00.0 Ethernet controller: Raspberry Pi Ltd RP1 PCIe 2.0 South Bridge
pi@pi5:~ $ dmesg | grep amd
[    5.139356] [drm] amdgpu kernel modesetting enabled.
[    5.139552] amdgpu 0001:03:00.0: enabling device (0000 -> 0002)
[    5.144260] amdgpu 0001:03:00.0: amdgpu: detected ip block number 0 <soc21_common>
[    5.144267] amdgpu 0001:03:00.0: amdgpu: detected ip block number 1 <gmc_v11_0>
[    5.144270] amdgpu 0001:03:00.0: amdgpu: detected ip block number 2 <ih_v6_0>
[    5.144273] amdgpu 0001:03:00.0: amdgpu: detected ip block number 3 <psp>
[    5.144275] amdgpu 0001:03:00.0: amdgpu: detected ip block number 4 <smu>
[    5.144279] amdgpu 0001:03:00.0: amdgpu: detected ip block number 5 <dm>
[    5.144281] amdgpu 0001:03:00.0: amdgpu: detected ip block number 6 <gfx_v11_0>
[    5.144284] amdgpu 0001:03:00.0: amdgpu: detected ip block number 7 <sdma_v6_0>
[    5.144288] amdgpu 0001:03:00.0: amdgpu: detected ip block number 8 <vcn_v4_0>
[    5.144290] amdgpu 0001:03:00.0: amdgpu: detected ip block number 9 <jpeg_v4_0>
[    5.144293] amdgpu 0001:03:00.0: amdgpu: detected ip block number 10 <mes_v11_0>
[    5.159378] amdgpu 0001:03:00.0: amdgpu: Fetched VBIOS from ROM BAR
[    5.159389] amdgpu: ATOM BIOS: 113-31TESHBS1-L02
[    5.159440] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/psp_13_0_0_sos.bin failed with error -2
[    5.159447] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <psp> failed -19
[    5.159827] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/smu_13_0_0.bin failed with error -2
[    5.159831] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <smu> failed -19
[    5.160133] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/dcn_3_2_0_dmcub.bin failed with error -2
[    5.160137] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <dm> failed -19
[    5.160440] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/gc_11_0_0_pfp.bin failed with error -2
[    5.160445] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <gfx_v11_0> failed -19
[    5.160751] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/sdma_6_0_0.bin failed with error -2
[    5.160757] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <sdma_v6_0> failed -19
[    5.161077] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/vcn_4_0_0.bin failed with error -2
[    5.161081] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <vcn_v4_0> failed -19
[    5.161390] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/gc_11_0_0_mes_2.bin failed with error -2
[    5.161394] amdgpu 0001:03:00.0: amdgpu: try to fall back to gc_11_0_0_mes.bin
[    5.161401] amdgpu 0001:03:00.0: Direct firmware load for amdgpu/gc_11_0_0_mes.bin failed with error -2
[    5.161404] [drm:amdgpu_device_init [amdgpu]] *ERROR* early_init of IP block <mes_v11_0> failed -19
[    5.161696] amdgpu 0001:03:00.0: amdgpu: Fatal error during GPU init
[    5.161699] amdgpu 0001:03:00.0: amdgpu: amdgpu: finishing device.

This is testing with the patch from this discussion:

diff --git a/drivers/gpu/drm/ttm/ttm_bo_util.c b/drivers/gpu/drm/ttm/ttm_bo_util.c
index bd90404ea609..cd42a5ebad53 100644
--- a/drivers/gpu/drm/ttm/ttm_bo_util.c
+++ b/drivers/gpu/drm/ttm/ttm_bo_util.c
@@ -344,8 +344,6 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
 		.no_wait_gpu = false
 	};
 	struct ttm_tt *ttm = bo->ttm;
-	struct ttm_resource_manager *man =
-			ttm_manager_type(bo->bdev, bo->resource->mem_type);
 	pgprot_t prot;
 	int ret;
 
@@ -355,17 +353,7 @@ static int ttm_bo_kmap_ttm(struct ttm_buffer_object *bo,
 	if (ret)
 		return ret;
 
-	if (num_pages == 1 && ttm->caching == ttm_cached &&
-	    !(man->use_tt && (ttm->page_flags & TTM_TT_FLAG_DECRYPTED))) {
-		/*
-		 * We're mapping a single page, and the desired
-		 * page protection is consistent with the bo.
-		 */
-
-		map->bo_kmap_type = ttm_bo_map_kmap;
-		map->page = ttm->pages[start_page];
-		map->virtual = kmap(map->page);
-	} else {
+	{
 		/*
 		 * We need to use vmap to get the desired page protection
 		 * or to make the buffer object look contiguous.
diff --git a/drivers/gpu/drm/ttm/ttm_module.c b/drivers/gpu/drm/ttm/ttm_module.c
index b3fffe7b5062..9f3e425626b5 100644
--- a/drivers/gpu/drm/ttm/ttm_module.c
+++ b/drivers/gpu/drm/ttm/ttm_module.c
@@ -63,7 +63,12 @@ pgprot_t ttm_prot_from_caching(enum ttm_caching caching, pgprot_t tmp)
 {
 	/* Cached mappings need no adjustment */
 	if (caching == ttm_cached)
+	{
+#ifdef CONFIG_ARM64
+		return pgprot_dmacoherent(tmp);
+#endif
 		return tmp;
+	}
 
 #if defined(__i386__) || defined(__x86_64__)
 	if (caching == ttm_write_combined)

geerlingguy avatar Sep 22 '25 18:09 geerlingguy

I installed the firmware for this card with:

# Install the base AMD GPU firmware
sudo apt install -y firmware-amd-graphics

# Reboot so the Pi can load the firmware
sudo reboot

It looks like all the right firmware is included in the firmware-amd-graphics package now, unlike how it was when I was initially testing the W7700...

geerlingguy avatar Sep 22 '25 18:09 geerlingguy

$ dmesg | grep amdgpu
[    5.087555] [drm] amdgpu kernel modesetting enabled.
[    5.087774] amdgpu 0001:03:00.0: enabling device (0000 -> 0002)
[    5.092634] amdgpu 0001:03:00.0: amdgpu: detected ip block number 0 <soc21_common>
[    5.092989] amdgpu 0001:03:00.0: amdgpu: detected ip block number 1 <gmc_v11_0>
[    5.092997] amdgpu 0001:03:00.0: amdgpu: detected ip block number 2 <ih_v6_0>
[    5.093002] amdgpu 0001:03:00.0: amdgpu: detected ip block number 3 <psp>
[    5.093007] amdgpu 0001:03:00.0: amdgpu: detected ip block number 4 <smu>
[    5.093011] amdgpu 0001:03:00.0: amdgpu: detected ip block number 5 <dm>
[    5.093015] amdgpu 0001:03:00.0: amdgpu: detected ip block number 6 <gfx_v11_0>
[    5.093020] amdgpu 0001:03:00.0: amdgpu: detected ip block number 7 <sdma_v6_0>
[    5.093024] amdgpu 0001:03:00.0: amdgpu: detected ip block number 8 <vcn_v4_0>
[    5.093028] amdgpu 0001:03:00.0: amdgpu: detected ip block number 9 <jpeg_v4_0>
[    5.093032] amdgpu 0001:03:00.0: amdgpu: detected ip block number 10 <mes_v11_0>
[    5.120815] amdgpu 0001:03:00.0: amdgpu: Fetched VBIOS from ROM BAR
[    5.122590] amdgpu: ATOM BIOS: 113-31TESHBS1-L02
[    5.134621] amdgpu 0001:03:00.0: amdgpu: CP RS64 enable
[    5.149618] amdgpu 0001:03:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported
[    5.149640] amdgpu 0001:03:00.0: amdgpu: PCIE atomic ops is not supported
[    5.149688] amdgpu 0001:03:00.0: amdgpu: MEM ECC is not presented.
[    5.149691] amdgpu 0001:03:00.0: amdgpu: SRAM ECC is not presented.
[    5.149733] amdgpu 0001:03:00.0: BAR 2 [mem 0x1810000000-0x18101fffff 64bit pref]: releasing
[    5.149742] amdgpu 0001:03:00.0: BAR 0 [mem 0x1800000000-0x180fffffff 64bit pref]: releasing
[    5.149806] amdgpu 0001:03:00.0: BAR 0 [mem size 0x800000000 64bit pref]: can't assign; no space
[    5.149808] amdgpu 0001:03:00.0: BAR 0 [mem size 0x800000000 64bit pref]: failed to assign
[    5.149811] amdgpu 0001:03:00.0: BAR 2 [mem size 0x00200000 64bit pref]: can't assign; no space
[    5.149814] amdgpu 0001:03:00.0: BAR 2 [mem size 0x00200000 64bit pref]: failed to assign
[    5.149816] amdgpu 0001:03:00.0: BAR 0 [mem size 0x800000000 64bit pref]: can't assign; no space
[    5.149818] amdgpu 0001:03:00.0: BAR 0 [mem size 0x800000000 64bit pref]: failed to assign
[    5.149821] amdgpu 0001:03:00.0: BAR 2 [mem size 0x00200000 64bit pref]: can't assign; no space
[    5.149823] amdgpu 0001:03:00.0: BAR 2 [mem size 0x00200000 64bit pref]: failed to assign
[    5.149872] amdgpu 0001:03:00.0: BAR 0 [mem 0x1800000000-0x180fffffff 64bit pref]: assigned
[    5.149882] amdgpu 0001:03:00.0: BAR 2 [mem 0x1810000000-0x18101fffff 64bit pref]: assigned
[    5.149893] amdgpu 0001:03:00.0: amdgpu: VRAM: 20464M 0x0000008000000000 - 0x00000084FEFFFFFF (20464M used)
[    5.149896] amdgpu 0001:03:00.0: amdgpu: GART: 512M 0x00007FFF00000000 - 0x00007FFF1FFFFFFF
[    5.150037] [drm] amdgpu: 20464M of VRAM memory ready
[    5.150042] [drm] amdgpu: 8001M of GTT memory ready.
[    5.154882] amdgpu 0001:03:00.0: amdgpu: Found VCN firmware Version ENC: 1.20 DEC: 8 VEP: 0 Revision: 1
[    5.155857] amdgpu 0001:03:00.0: amdgpu: Found VCN firmware Version ENC: 1.20 DEC: 8 VEP: 0 Revision: 1
[    5.228755] amdgpu 0001:03:00.0: amdgpu: reserve 0x1300000 from 0x84fc000000 for PSP TMR
[    5.379132] amdgpu 0001:03:00.0: amdgpu: RAP: optional rap ta ucode is not available
[    5.379145] amdgpu 0001:03:00.0: amdgpu: SECUREDISPLAY: securedisplay ta ucode is not available
[    5.379231] amdgpu 0001:03:00.0: amdgpu: smu driver if version = 0x0000003d, smu fw if version = 0x00000040, smu fw program = 0, smu fw version = 0x004e7e00 (78.126.0)
[    5.379237] amdgpu 0001:03:00.0: amdgpu: SMU driver if version not matched
[    5.535882] amdgpu 0001:03:00.0: amdgpu: SMU is initialized successfully!
[    5.563997] amdgpu 0001:03:00.0: amdgpu: SE 6, SH per SE 2, CU per SH 8, active_cu_number 84
[    5.564019] amdgpu 0001:03:00.0: amdgpu: ring gfx_0.0.0 uses VM inv eng 0 on hub 0
[    5.564025] amdgpu 0001:03:00.0: amdgpu: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[    5.564029] amdgpu 0001:03:00.0: amdgpu: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[    5.564033] amdgpu 0001:03:00.0: amdgpu: ring comp_1.2.0 uses VM inv eng 6 on hub 0
[    5.564037] amdgpu 0001:03:00.0: amdgpu: ring comp_1.3.0 uses VM inv eng 7 on hub 0
[    5.564041] amdgpu 0001:03:00.0: amdgpu: ring comp_1.0.1 uses VM inv eng 8 on hub 0
[    5.564045] amdgpu 0001:03:00.0: amdgpu: ring comp_1.1.1 uses VM inv eng 9 on hub 0
[    5.564049] amdgpu 0001:03:00.0: amdgpu: ring comp_1.2.1 uses VM inv eng 10 on hub 0
[    5.564052] amdgpu 0001:03:00.0: amdgpu: ring comp_1.3.1 uses VM inv eng 11 on hub 0
[    5.564057] amdgpu 0001:03:00.0: amdgpu: ring sdma0 uses VM inv eng 12 on hub 0
[    5.564060] amdgpu 0001:03:00.0: amdgpu: ring sdma1 uses VM inv eng 13 on hub 0
[    5.564065] amdgpu 0001:03:00.0: amdgpu: ring vcn_unified_0 uses VM inv eng 0 on hub 8
[    5.564069] amdgpu 0001:03:00.0: amdgpu: ring vcn_unified_1 uses VM inv eng 1 on hub 8
[    5.564073] amdgpu 0001:03:00.0: amdgpu: ring jpeg_dec uses VM inv eng 4 on hub 8
[    5.564076] amdgpu 0001:03:00.0: amdgpu: ring mes_kiq_3.1.0 uses VM inv eng 14 on hub 0
[    5.568011] amdgpu 0001:03:00.0: amdgpu: Using BACO for runtime pm
[    5.570210] [drm] Initialized amdgpu 3.63.0 for 0001:03:00.0 on minor 2
[    5.573172] amdgpu 0001:03:00.0: [drm] Cannot find any crtc or sizes
[   10.206284] amdgpu 0001:03:00.0: [drm] fb0: amdgpudrmfb frame buffer device

It's working! Got display output at 60 Hz through HDMI and everything. No stutters, no artifacts, very nice!

geerlingguy avatar Sep 22 '25 18:09 geerlingguy

GravityMark showing a respectable 65,842:

Image

geerlingguy avatar Sep 22 '25 18:09 geerlingguy

Card is on the site here: https://pipci.jeffgeerling.com/cards_gpu/amd-radeon-rx7900xt-20gb.html

geerlingguy avatar Sep 22 '25 19:09 geerlingguy

I installed Steam via Pi-Apps/Box64, and it seems to work well. I was able to play Horizon Chase Turbo, but Portal 2 wouldn't launch. SuperTuxKart of course plays perfectly.

geerlingguy avatar Sep 22 '25 19:09 geerlingguy

Some llama.cpp Vulkan benchmarks over here: https://github.com/geerlingguy/ollama-benchmark/issues/23

geerlingguy avatar Sep 22 '25 20:09 geerlingguy