[Athlon 3000G] RAVEN2 "failed to load ucode id" and WARNING from DC dcn_calcs; horrifically corrupted images in almost every 3D game I've tried, Xft text intermittently vanishes in Emacs
I observe the following WARNING and "failed to load ucode" messages when booting my new desktop, an Athlon 3000G (Vega / RAVEN2-based), using either 5.6.2 or 5.6.5 and the latest linux-firmware git tree, with this firmware set:
CONFIG_EXTRA_FIRMWARE="amdgpu/raven2_asd.bin amdgpu/raven2_ce.bin amdgpu/raven2_gpu_info.bin amdgpu/raven2_me.bin amdgpu/raven2_mec.bin amdgpu/raven2_mec2.bin amdgpu/raven2_pfp.bin amdgpu/raven2_rlc.bin amdgpu/raven2_sdma.bin amdgpu/raven2_ta.bin amdgpu/raven2_vcn.bin"
The following relevant .config options are on:
CONFIG_DRM_AMDGPU_USERPTR=y
CONFIG_DRM_AMD_DC=y
CONFIG_DRM_AMD_DC_DCN=y
CONFIG_HSA_AMD=y
CONFIG_DRM_PANEL=y
CONFIG_DRM_BRIDGE=y
CONFIG_DRM_PANEL_BRIDGE=y
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
(Full .config here: http://www.esperi.org.uk/~nix/vega_config)
I see something damn near identical on a Fedora LiveCD (er, live USB key) running 5.3.7, so if this is a kernel config error, it's not just me that's making it.
[ 0.767684] Parsing CRAT table with 1 nodes
[ 0.767688] Creating topology SYSFS entries
[ 0.767700] Topology: Add APU node [0x0:0x0]
[ 0.767702] Finished initializing topology
[ 0.767749] amdgpu 0000:0a:00.0: enabling device (0006 -> 0007)
[ 0.767848] [drm] initializing kernel modesetting (RAVEN 0x1002:0x15D8 0x1043:0x876B 0xCC).
[ 0.767856] [drm] register mmio base: 0xFC800000
[ 0.767858] [drm] register mmio size: 524288
[ 0.767877] [drm] add ip block number 0 <soc15_common>
[ 0.767880] [drm] add ip block number 1 <gmc_v9_0>
[ 0.767882] [drm] add ip block number 2 <vega10_ih>
[ 0.767884] [drm] add ip block number 3 <psp>
[ 0.767886] [drm] add ip block number 4 <gfx_v9_0>
[ 0.767889] [drm] add ip block number 5 <sdma_v4_0>
[ 0.767891] [drm] add ip block number 6 <powerplay>
[ 0.767894] [drm] add ip block number 7 <dm>
[ 0.767896] [drm] add ip block number 8 <vcn_v1_0>
[ 0.767909] ATOM BIOS: 113-RAVEN2-114
[ 0.767917] [drm] VCN decode is enabled in VM mode
[ 0.767919] [drm] VCN encode is enabled in VM mode
[ 0.767921] [drm] JPEG decode is enabled in VM mode
[ 0.767952] [drm] vm size is 262144 GB, 3 levels, block size is 9-bit, fragment size is 9-bit
[ 0.767964] amdgpu 0000:0a:00.0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[ 0.767969] amdgpu 0000:0a:00.0: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
[ 0.767972] amdgpu 0000:0a:00.0: AGP: 267419648M 0x000000F800000000 - 0x0000FFFFFFFFFFFF
[ 0.767978] [drm] Detected VRAM RAM=2048M, BAR=2048M
[ 0.767981] [drm] RAM width 128bits DDR4
[ 0.768010] [TTM] Zone kernel: Available graphics memory: 7163206 KiB
[ 0.768013] [TTM] Zone dma32: Available graphics memory: 2097152 KiB
[ 0.768015] [TTM] Initializing pool allocator
[ 0.768019] [TTM] Initializing DMA pool allocator
[ 0.768082] [drm] amdgpu: 2048M of VRAM memory ready
[ 0.768086] [drm] amdgpu: 3072M of GTT memory ready.
[ 0.768098] [drm] GART: num cpu pages 262144, num gpu pages 262144
[ 0.768475] [drm] PCIE GART of 1024M enabled (table at 0x000000F400900000).
[ 0.769320] [drm] use_doorbell being set to: [true]
[ 0.769361] amdgpu: [powerplay] hwmgr_sw_init smu backed is smu10_smu
[ 0.769382] [drm] Found VCN firmware Version ENC: 1.9 DEC: 1 VEP: 0 Revision: 28
[ 0.769387] [drm] PSP loading VCN firmware
[ 0.789964] [drm] reserve 0x400000 from 0xf47f800000 for PSP TMR
[ 0.852833] [drm] failed to load ucode id (17)
[ 0.852834] [drm] psp command (0x6) failed and response status is (0xFFFF300F)
[ 0.855832] [drm] failed to load ucode id (18)
[ 0.855832] [drm] psp command (0x6) failed and response status is (0xFFFF000F)
[ 0.858834] [drm] failed to load ucode id (19)
[ 0.858835] [drm] psp command (0x6) failed and response status is (0xFFFF000F)
[ 0.879838] amdgpu 0000:0a:00.0: RAS: ras ta ucode is not available
[ 0.891050] [drm] kiq ring mec 2 pipe 1 q 0
[ 0.891391] [drm] DM_PPLIB: values for F clock
[ 0.891400] ------------[ cut here ]------------
[ 0.891407] WARNING: CPU: 0 PID: 1 at drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1473 dcn_bw_update_from_pplib+0x9c/0x284
[ 0.891411] Modules linked in:
[ 0.891416] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 5.6.5-00024-gaebd6a0bd2e8-dirty #7
[ 0.891419] Hardware name: System manufacturer System Product Name/PRIME A320M-A, BIOS 5222 10/14/2019
[ 0.891424] RIP: 0010:dcn_bw_update_from_pplib+0x9c/0x284
[ 0.891428] Code: d2 74 27 8d 7a ff 48 8d 44 24 04 48 8d 4c fc 0c 48 89 fe eb 0d 48 83 c0 08 48 39 c1 0f 84 07 01 00 00 44 8b 00 45 85 c0 75 eb <0f> 0b e8 8d 4c 89 ff 4c 89 e2 be 04 00 00 00 4c 89 ef e8 1d 81 fe
[ 0.891435] RSP: 0018:ffffac188006f830 EFLAGS: 00010246
[ 0.891439] RAX: 0000000080000000 RBX: ffff9dbd0d190000 RCX: ffff9dbd0f3e5700
[ 0.891442] RDX: 0000000000000000 RSI: 0000000000000096 RDI: ffffffff92bdac64
[ 0.891446] RBP: ffffac188006f970 R08: 0000000000000000 R09: 00000000000002af
[ 0.891449] R10: 0720072007200720 R11: 0720072007200720 R12: ffffac188006f8c0
[ 0.891452] R13: ffff9dbd0d1509c0 R14: 0000000000000001 R15: ffff9dbd0d1509c0
[ 0.891456] FS: 0000000000000000(0000) GS:ffff9dbd10c00000(0000) knlGS:0000000000000000
[ 0.891460] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 0.891463] CR2: ffff9dbd1efff000 CR3: 0000000206809000 CR4: 00000000003406f0
[ 0.891466] Call Trace:
[ 0.891474] dcn10_create_resource_pool+0x821/0xb59
[ 0.891478] ? get_smu_clock_info_v3_1+0x3c/0x49
[ 0.891483] dc_create_resource_pool+0x2e/0x12e
[ 0.891487] ? dal_gpio_service_create+0x9b/0x11c
[ 0.891491] dc_create+0x1aa/0x685
[ 0.891496] ? kmem_cache_alloc_trace+0x2a/0x1e0
[ 0.891501] ? amdgpu_cgs_create_device+0x27/0x54
[ 0.891505] amdgpu_dm_init+0x134/0x18c
[ 0.891509] ? amdgpu_cgs_read_register+0x14/0x16
[ 0.891514] ? phm_wait_for_register_unequal.part.0+0x51/0x7f
[ 0.891519] dm_hw_init+0x13/0x21
[ 0.891523] amdgpu_device_init.cold+0x114b/0x1538
[ 0.891527] ? kmalloc_order+0x60/0x69
[ 0.891532] amdgpu_driver_load_kms+0x4f/0x129
[ 0.891536] drm_dev_register+0x13e/0x175
[ 0.891540] amdgpu_pci_probe+0xb8/0x10f
[ 0.891544] ? __pm_runtime_resume+0x5b/0x70
[ 0.891548] pci_device_probe+0xf2/0x15f
[ 0.891552] really_probe+0xff/0x2b5
[ 0.891556] driver_probe_device+0x61/0xd4
[ 0.891560] device_driver_attach+0x6d/0x72
[ 0.891564] __driver_attach+0x58/0xd1
[ 0.891567] ? device_driver_attach+0x80/0x72
[ 0.891571] bus_for_each_dev+0x67/0x8d
[ 0.891574] ? kmem_cache_alloc_trace+0x1d7/0x1e0
[ 0.891578] driver_attach+0x1e/0x20
[ 0.891582] bus_add_driver+0x192/0x1d6
[ 0.891586] driver_register+0x74/0xc6
[ 0.891590] ? drm_sched_fence_slab_init+0x36/0x36
[ 0.891594] __pci_register_driver+0x54/0x56
[ 0.891597] amdgpu_init+0x77/0x79
[ 0.891601] do_one_initcall+0x41/0x1cd
[ 0.891606] kernel_init_freeable+0x16b/0x1cd
[ 0.891611] ? rest_init+0xc0/0xc0
[ 0.891614] kernel_init+0xe/0xf5
[ 0.891618] ret_from_fork+0x1f/0x2a
[ 0.891623] ---[ end trace 45e7e17e059bf857 ]---
[ 0.891627] [drm] DM_PPLIB: values for DCF clock
[ 0.891629] [drm] DM_PPLIB: 300000 in kHz, 3649 in mV
[ 0.891632] [drm] DM_PPLIB: 600000 in kHz, 3974 in mV
[ 0.891635] [drm] DM_PPLIB: 626000 in kHz, 4174 in mV
[ 0.891638] [drm] DM_PPLIB: 654000 in kHz, 4325 in mV
[ 0.892194] [drm] Display Core initialized with v3.2.69!
[ 0.939669] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 0.939674] [drm] Driver supports precise vblank timestamp query.
[ 0.951224] [drm] VCN decode and encode initialized successfully(under SPG Mode).
[ 0.951863] kfd kfd: Allocated 3969056 bytes on gart
[ 0.952240] Topology: Add APU node [0x15d8:0x1002]
[ 0.952244] kfd kfd: added device 1002:15d8
[ 0.953769] [drm] fb mappable at 0x39FBC1000
[ 0.953773] [drm] vram apper at 0x39F000000
[ 0.953775] [drm] size 7299072
[ 0.953778] [drm] fb depth is 24
[ 0.953780] [drm] pitch is 6912
[ 0.996075] Console: switching to colour frame buffer device 210x65
[ 1.012803] amdgpu 0000:0a:00.0: fb0: amdgpudrmfb frame buffer device
[ 1.013671] amdgpu 0000:0a:00.0: ring gfx uses VM inv eng 0 on hub 0
[ 1.014503] amdgpu 0000:0a:00.0: ring comp_1.0.0 uses VM inv eng 1 on hub 0
[ 1.015324] amdgpu 0000:0a:00.0: ring comp_1.1.0 uses VM inv eng 4 on hub 0
[ 1.015966] amdgpu 0000:0a:00.0: ring comp_1.2.0 uses VM inv eng 5 on hub 0
[ 1.016597] amdgpu 0000:0a:00.0: ring comp_1.3.0 uses VM inv eng 6 on hub 0
[ 1.017210] amdgpu 0000:0a:00.0: ring comp_1.0.1 uses VM inv eng 7 on hub 0
[ 1.017803] amdgpu 0000:0a:00.0: ring comp_1.1.1 uses VM inv eng 8 on hub 0
[ 1.018384] amdgpu 0000:0a:00.0: ring comp_1.2.1 uses VM inv eng 9 on hub 0
[ 1.018962] amdgpu 0000:0a:00.0: ring comp_1.3.1 uses VM inv eng 10 on hub 0
[ 1.019526] amdgpu 0000:0a:00.0: ring kiq_2.1.0 uses VM inv eng 11 on hub 0
[ 1.020091] amdgpu 0000:0a:00.0: ring sdma0 uses VM inv eng 0 on hub 1
[ 1.020654] amdgpu 0000:0a:00.0: ring vcn_dec uses VM inv eng 1 on hub 1
[ 1.021219] amdgpu 0000:0a:00.0: ring vcn_enc0 uses VM inv eng 4 on hub 1
[ 1.021782] amdgpu 0000:0a:00.0: ring vcn_enc1 uses VM inv eng 5 on hub 1
[ 1.022340] amdgpu 0000:0a:00.0: ring jpeg_dec uses VM inv eng 6 on hub 1
[ 1.029880] [drm] Initialized amdgpu 3.36.0 20150101 for 0000:0a:00.0 on minor 0```
I *believe* the effect of this is that the mclks and fclks are garbage, though the sclks look ok, so *maybe* this will only impact power-saving? I don't know...
nix@silk 12 /home/nix% cat /sys/class/drm/card0/device/pp_dpm_dcefclk
nix@silk 13 /home/nix% cat /sys/class/drm/card0/device/pp_dpm_fclk
nix@silk 14 /home/nix% cat /sys/class/drm/card0/device/pp_dpm_mclk
0: 0Mhz
1: 0Mhz
2: 0Mhz
3: 0Mhz
nix@silk 15 /home/nix% cat /sys/class/drm/card0/device/pp_dpm_pcie
nix@silk 16 /home/nix% cat /sys/class/drm/card0/device/pp_dpm_sclk
0: 200Mhz
1: 400Mhz *
2: 1100Mhz