James Lewis Posted yesterday at 09:17 PM Posted yesterday at 09:17 PM I'm kinda new here, and lets first say thank you for Armbian, it has kinda saved me from having to do a lot more work than I have had to, to get my Orange Pi 5 Plus to a state where it's really a pretty cool little test/experimental system... BUT, I wondered... since many of these devices have accessible PCIe in one form or another, and the Mali GPU is a bit of a blocker... Perhaps it would be good to build the kernel with the modules for open source GPUs for Mesa... AMDGPU, XE, and i915.. Currently I'm in this position... I know I could clone the project from GIT, and build my own kernel, but this seems like an obvious next step and I wonder how many other people would try this if the modules were available. root@mouse:/home/james# lscpu | head -5 Architecture: aarch64 CPU op-mode(s): 32-bit, 64-bit Byte Order: Little Endian CPU(s): 8 On-line CPU(s) list: 0-7 root@mouse:/home/james# free -h total used free shared buff/cache available Mem: 30Gi 4.1Gi 18Gi 723Mi 9.2Gi 26Gi Swap: 15Gi 0B 15Gi root@mouse:/home/james# df -h . Filesystem Size Used Avail Use% Mounted on /dev/sda1 800G 322G 475G 41% /home root@mouse:/home/james# lspci 0000:00:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) 0000:01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Lexa PRO [Radeon 540/540X/550/550X / RX 540X/550/550X] (rev c7) 0000:01:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Baffin HDMI/DP Audio [Radeon RX 550 640SP / RX 560/560X] 0002:20:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) 0002:21:00.0 Network controller: Intel Corporation Wi-Fi 6E(802.11ax) AX210/AX1675* 2x2 [Typhoon Peak] (rev 1a) 0003:30:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) 0003:31:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05) 0004:40:00.0 PCI bridge: Rockchip Electronics Co., Ltd RK3588 (rev 01) 0004:41:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05) root@mouse:/home/james# modprobe amdgpu modprobe: FATAL: Module amdgpu not found in directory /lib/modules/6.18.16-current-rockchip64 root@mouse:/home/james# 0 Quote
James Lewis Posted 19 hours ago Author Posted 19 hours ago Making progress, but it seems there a number of problems to work through... Here's my current state, comments/suggestions welcome It does seem to eventually be happy(ish) with the BAR setup wth minor DTB changei, but it doesn't seem to even try to load the firmware.... :- [ 950.592779] amdgpu 0000:01:00.0: amdgpu: initializing kernel modesetting (POLARIS12 0x1002:0x699F 0x1458:0x22F2 0xC7). [ 950.592800] amdgpu 0000:01:00.0: amdgpu: register mmio base: 0xF0200000 [ 950.592802] amdgpu 0000:01:00.0: amdgpu: register mmio size: 262144 [ 950.592956] amdgpu 0000:01:00.0: amdgpu: detected ip block number 0 <common_v1_0_0> (vi_common) [ 950.592960] amdgpu 0000:01:00.0: amdgpu: detected ip block number 1 <gmc_v8_1_0> (gmc_v8_0) [ 950.592962] amdgpu 0000:01:00.0: amdgpu: detected ip block number 2 <ih_v3_0_0> (tonga_ih) [ 950.592965] amdgpu 0000:01:00.0: amdgpu: detected ip block number 3 <gfx_v8_0_0> (gfx_v8_0) [ 950.592967] amdgpu 0000:01:00.0: amdgpu: detected ip block number 4 <sdma_v3_1_0> (sdma_v3_0) [ 950.592970] amdgpu 0000:01:00.0: amdgpu: detected ip block number 5 <smu_v1_0_0> (powerplay) [ 950.592972] amdgpu 0000:01:00.0: amdgpu: detected ip block number 6 <dce_v1_0_0> (dm) [ 950.592975] amdgpu 0000:01:00.0: amdgpu: detected ip block number 7 <uvd_v6_3_0> (uvd_v6_0) [ 950.592977] amdgpu 0000:01:00.0: amdgpu: detected ip block number 8 <vce_v3_4_0> (vce_v3_0) [ 950.920388] amdgpu 0000:01:00.0: amdgpu: Fetched VBIOS from ROM BAR [ 950.920394] amdgpu: ATOM BIOS: xxx-xxx-xxx [ 950.920492] [drm] UVD is enabled in VM mode [ 950.920494] [drm] UVD ENC is enabled in VM mode [ 950.920497] [drm] VCE enabled in VM mode [ 950.920500] amdgpu 0000:01:00.0: amdgpu: Trusted Memory Zone (TMZ) feature not supported [ 950.920504] amdgpu 0000:01:00.0: amdgpu: PCIE atomic ops is not supported [ 950.920510] amdgpu 0000:01:00.0: amdgpu: PCI CONFIG reset [ 950.920627] amdgpu 0000:01:00.0: amdgpu: GPU posting now... [ 951.046148] amdgpu 0000:01:00.0: amdgpu: vm size is 128 GB, 2 levels, block size is 10-bit, fragment size is 9-bit [ 951.046277] amdgpu 0000:01:00.0: BAR 2 [mem 0x910000000-0x9101fffff 64bit pref]: releasing [ 951.046282] amdgpu 0000:01:00.0: BAR 0 [mem 0x900000000-0x90fffffff 64bit pref]: releasing [ 951.046315] pcieport 0000:00:00.0: bridge window [mem 0x900000000-0x9101fffff 64bit pref]: releasing [ 951.046323] pcieport 0000:00:00.0: bridge window [mem size 0x80200000 64bit pref]: can't assign; no space [ 951.046325] pcieport 0000:00:00.0: bridge window [mem size 0x80200000 64bit pref]: failed to assign [ 951.046330] pcieport 0000:00:00.0: bridge window [mem size 0x80200000 64bit pref]: can't assign; no space [ 951.046332] pcieport 0000:00:00.0: bridge window [mem size 0x80200000 64bit pref]: failed to assign [ 951.046335] amdgpu 0000:01:00.0: BAR 0 [mem size 0x80000000 64bit pref]: can't assign; no space [ 951.046337] amdgpu 0000:01:00.0: BAR 0 [mem size 0x80000000 64bit pref]: failed to assign [ 951.046339] amdgpu 0000:01:00.0: BAR 2 [mem size 0x00200000 64bit pref]: can't assign; no space [ 951.046341] amdgpu 0000:01:00.0: BAR 2 [mem size 0x00200000 64bit pref]: failed to assign [ 951.046344] amdgpu 0000:01:00.0: BAR 0 [mem size 0x80000000 64bit pref]: can't assign; no space [ 951.046345] amdgpu 0000:01:00.0: BAR 0 [mem size 0x80000000 64bit pref]: failed to assign [ 951.046347] amdgpu 0000:01:00.0: BAR 2 [mem size 0x00200000 64bit pref]: can't assign; no space [ 951.046349] amdgpu 0000:01:00.0: BAR 2 [mem size 0x00200000 64bit pref]: failed to assign [ 951.046352] pcieport 0000:00:00.0: PCI bridge to [bus 01-ff] [ 951.046354] pcieport 0000:00:00.0: bridge window [io 0x300000-0x300fff] [ 951.046357] pcieport 0000:00:00.0: bridge window [mem 0xf0200000-0xf02fffff] [ 951.046360] pcieport 0000:00:00.0: PCI bridge to [bus 01-ff] [ 951.046362] pcieport 0000:00:00.0: bridge window [io 0x300000-0x300fff] [ 951.046364] pcieport 0000:00:00.0: bridge window [mem 0xf0200000-0xf02fffff] [ 951.046367] pcieport 0000:00:00.0: bridge window [mem 0x900000000-0x9101fffff 64bit pref] [ 951.046380] amdgpu 0000:01:00.0: amdgpu: Not enough PCI address space for a large BAR. [ 951.046383] amdgpu 0000:01:00.0: BAR 0 [mem 0x900000000-0x90fffffff 64bit pref]: assigned [ 951.046405] amdgpu 0000:01:00.0: BAR 2 [mem 0x910000000-0x9101fffff 64bit pref]: assigned [ 951.046430] amdgpu 0000:01:00.0: amdgpu: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used) [ 951.046433] amdgpu 0000:01:00.0: amdgpu: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF [ 951.046438] [drm] Detected VRAM RAM=2048M, BAR=256M [ 951.046440] [drm] RAM width 128bits GDDR5 [ 951.046690] amdgpu 0000:01:00.0: amdgpu: amdgpu: 2048M of VRAM memory ready [ 951.046695] amdgpu 0000:01:00.0: amdgpu: amdgpu: 15812M of GTT memory ready. [ 951.046733] [drm] GART: num cpu pages 65536, num gpu pages 65536 [ 951.048243] [drm] PCIE GART of 256M enabled (table at 0x000000F400000000). [ 951.048855] [drm] Chained IB support enabled! [ 951.050102] amdgpu: hwmgr_sw_init smu backed is polaris10_smu [ 951.050568] [drm] Found UVD firmware Version: 1.130 Family ID: 16 [ 951.054854] [drm] Found VCE firmware Version: 53.26 Binary ID: 3 [ 951.264633] amdgpu 0000:01:00.0: [drm:amdgpu_ring_test_helper [amdgpu]] *ERROR* ring gfx test failed (-110) [ 951.266003] amdgpu 0000:01:00.0: amdgpu: hw_init of IP block <gfx_v8_0> failed -110 [ 951.266667] amdgpu 0000:01:00.0: amdgpu: amdgpu_device_ip_init failed [ 951.267227] amdgpu 0000:01:00.0: amdgpu: Fatal error during GPU init [ 951.267780] amdgpu 0000:01:00.0: amdgpu: amdgpu: finishing device. 0 Quote
James Lewis Posted 4 hours ago Author Posted 4 hours ago Hmm, after a lot of fiddling, I have concluded that the particular GPU I have needs a BAR size larger than the hardware platform can deliver... the stock DTB supplied with Armbian limits it to 1GB, and I managed to increase it to 2GB without issue... but the card requires 2GB+ 2MB, and so it fails every time. It seems that some other cards, both older and newer have more flexible VBIOS, so I'm going to try to obtain one of those, and lets see where we get to. I'd still like to ask that AMDGPU and XE graphics modules be enabled in the regular Armbian kernel, it doesn't seem like a big overhead!... Updates once I find another card. 0 Quote
SteeMan Posted 4 hours ago Posted 4 hours ago 10 minutes ago, James Lewis said: it doesn't seem like a big overhead!... How much size does it add? Remember there are a wide variety of boards supported some with limited storage and ram. 0 Quote
SteeMan Posted 4 hours ago Posted 4 hours ago Ultimately, once you have this working, you should submit a PR and justify the inclusion of this feature with details on the pros and cons. 0 Quote
James Lewis Posted 1 hour ago Author Posted 1 hour ago Yes, it is a fair point that I've not demonstrated that it can actually be made to work yet, I'm working on that part,.... and as you say, it's also a fair question to ask how much impact compiling those drivers as modules has on systems not using them. That latter question I /can/ answer. The increase in the kernel in memory is about 5MB, and the increase in the /lib/modules/ is about 26MB I did notice when I went through the build process to make a new kernel/image (That's pretty impressive work BTW, great job!)... that there is a distinction between a server and desktop image... obviously in the server build this wouldn't be a thing, and the desktop image would probably be useless on a machine that couldn't spare 5MB... Point taken tho, I'll post some updates here once it's working. 0 Quote
SteeMan Posted 1 hour ago Posted 1 hour ago 37 minutes ago, James Lewis said: a distinction between a server and desktop image... That is true that there are images that target server vs. desktop. But they share the same kernel. I find what you are working on an interesting idea. Good luck getting it working. 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.