amdgpu panics

Grzegorz Junka list1 at gjunka.com
Thu Apr 9 18:32:49 UTC 2020


Tried just now with 12-STABLE installed using FreeBSD-base and all kmod 
packages recompiled in a jail that was created from the same obj/usr as 
the 12-STABLE base packages. In other words:

The build host is running 12.1-RELEASE-p3. On it I fetched 12-STABLE and 
compiled world and kernel. Then packaged both into FreeBSD-base packages 
to install on the destination desktop. Then I created a new poudriere 
jail using the same 12-STABLE usr/obj. Then I used that jail to build 
drm-kmod, drm-fbsd12.0-kmod and gpu-firmware-kmod. Then I reinstalled 
the base (world/kernel) on the destination desktop using FreeBSD-base 
packages and reinstalled on it the three kmod packages recompiled with 
poudriere.

The result is (almost) exactly the same as with 12.1-RELEASE-p3. The 
screen goes blank and to sleep after a few seconds. The ssh session 
survived:

root at venus:~ # kldstat
Id Refs Address                Size Name
  1  142 0xffffffff80200000  226f3f0 kernel
  2    1 0xffffffff82470000   3adf68 zfs.ko
  3    2 0xffffffff8281e000     a430 opensolaris.ko
  4    1 0xffffffff82e11000     4950 linprocfs.ko
  5    3 0xffffffff82e16000     3148 linux_common.ko
  6    1 0xffffffff82e1a000     8838 tmpfs.ko
  7    1 0xffffffff82e23000    16b50 if_iwm.ko
  8    1 0xffffffff82e3a000    fb11f iwm3168fw.ko
  9    1 0xffffffff82f36000     2658 intpm.ko
10    1 0xffffffff82f39000      b60 smbus.ko
11    1 0xffffffff82f3a000     1880 uhid.ko
12    1 0xffffffff82f3c000     2968 ums.ko
13    1 0xffffffff82f3f000     1a40 wmt.ko
14    1 0xffffffff82f41000     cbd0 snd_uaudio.ko
15    1 0xffffffff82f4e000     4240 ng_ubt.ko
16    6 0xffffffff82f53000     9be0 netgraph.ko
17    2 0xffffffff82f5d000     91e8 ng_hci.ko
18    3 0xffffffff82f67000      9b0 ng_bluetooth.ko
19    1 0xffffffff82f68000     cb40 ng_l2cap.ko
20    1 0xffffffff82f75000    1b420 ng_btsocket.ko
21    1 0xffffffff82f91000     2180 ng_socket.ko
22    1 0xffffffff82f94000    3d450 linux.ko
23    1 0xffffffff82fd2000    35260 linux64.ko
24    1 0xffffffff83008000     1a88 fdescfs.ko
25    3 0xffffffff8300a000    764b0 drm.ko
26    5 0xffffffff83081000    11170 linuxkpi.ko
27    4 0xffffffff83093000    13f30 linuxkpi_gplv2.ko
28    2 0xffffffff830a7000      6d0 debugfs.ko
30    1 0xffffffff832f8000     ef41 ttm.ko
31    1 0xffffffff83307000      2c1 amdgpu_vega10_gpu_info_bin.ko
32    1 0xffffffff83308000    27d07 amdgpu_vega10_sos_bin.ko
33    1 0xffffffff83330000    1e377 amdgpu_vega10_asd_bin.ko
34    1 0xffffffff8334f000    4047f amdgpu_vega10_acg_smc_bin.ko
35    1 0xffffffff83390000     55f7 amdgpu_vega10_pfp_bin.ko
36    1 0xffffffff83396000     45f5 amdgpu_vega10_me_bin.ko
37    1 0xffffffff8339b000     25f5 amdgpu_vega10_ce_bin.ko
38    1 0xffffffff8339e000     4477 amdgpu_vega10_rlc_bin.ko
39    1 0xffffffff833a3000    41887 amdgpu_vega10_mec_bin.ko
40    1 0xffffffff833e5000    41889 amdgpu_vega10_mec2_bin.ko
41    1 0xffffffff83427000     4579 amdgpu_vega10_sdma_bin.ko
42    1 0xffffffff8342c000     457b amdgpu_vega10_sdma1_bin.ko
43    1 0xffffffff83431000    5c337 amdgpu_vega10_uvd_bin.ko
44    1 0xffffffff8348e000    2a797 amdgpu_vega10_vce_bin.ko

root at venus:~ # dmesg
---<<BOOT>>---
Copyright (c) 1992-2020 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
         The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.1-STABLE r359722 GENERIC amd64
FreeBSD clang version 9.0.1 (git at github.com:llvm/llvm-project.git 
c1a0a213378a458fbea1a5c77b315c7dce08fd05) (based on LLVM 9.0.1)
VT(efifb): resolution 1024x768
CPU: AMD Ryzen 7 2700X Eight-Core Processor          (3700.37-MHz 
K8-class CPU)
   Origin="AuthenticAMD"  Id=0x800f82  Family=0x17  Model=0x8 Stepping=2
Features=0x178bfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,MMX,FXSR,SSE,SSE2,HTT>
Features2=0x7ed8320b<SSE3,PCLMULQDQ,MON,SSSE3,FMA,CX16,SSE4.1,SSE4.2,MOVBE,POPCNT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
   AMD Features=0x2e500800<SYSCALL,NX,MMX+,FFXSR,Page1GB,RDTSCP,LM>
   AMD 
Features2=0x35c233ff<LAHF,CMP,SVM,ExtAPIC,CR8,ABM,SSE4A,MAS,Prefetch,OSVW,SKINIT,WDT,TCE,Topology,PCXC,PNXC,DBE,PL2I,MWAITX>
   Structured Extended 
Features=0x209c01a9<FSGSBASE,BMI1,AVX2,SMEP,BMI2,RDSEED,ADX,SMAP,CLFLUSHOPT,SHA>
   XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
   AMD Extended Feature Extensions ID EBX=0x1007<CLZERO,IRPerf,XSaveErPtr>
   SVM: (disabled in BIOS) NP,NRIP,VClean,AFlush,DAssist,NAsids=32768
   TSC: P-state invariant, performance statistics
real memory  = 68719476736 (65536 MB)
avail memory = 66808102912 (63713 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I >
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 1 package(s) x 2 cache groups x 4 core(s) x 2 hardware threads
random: unblocking device.
Firmware Warning (ACPI): Optional FADT field Pm2ControlBlock has valid 
Length but zero Address: 0x0000000000000000/0x1 (20191213/tbfadt-796)
ioapic0 <Version 2.1> irqs 0-23 on motherboard
ioapic1 <Version 2.1> irqs 24-55 on motherboard
Launching APs: 12 13 9 15 8 11 1 10 14 7 6 3 4 5 2
Timecounter "TSC-low" frequency 1850186165 Hz quality 1000
random: entropy device external interface
kbd1 at kbdmux0
000.000023 [4336] netmap_init               netmap: loaded module
[ath_hal] loaded

(...)

[drm] amdgpu kernel modesetting enabled.
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] initializing kernel modesetting (VEGA10 0x1002:0x687F 
0x1002:0x0B36 0xC0).
[drm] register mmio base: 0xFD100000
[drm] register mmio size: 524288
[drm] PCI I/O BAR is not found.
drmn0: successfully loaded firmware image with name: 
amdgpu/vega10_gpu_info.bin
[drm] probing gen 2 caps for device 1022:1471 = 700d03/e
[drm] probing mlw for device 1002:687f = 400d03
[drm] UVD is enabled in VM mode
[drm] UVD ENC is enabled in VM mode
[drm] VCE enabled in VM mode
ATOM BIOS: 113-D0500500-104
[drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size 
is 9-bit
drmn0: VRAM: 8176M 0x000000F400000000 - 0x000000F5FEFFFFFF (8176M used)
drmn0: GTT: 256M 0x000000F600000000 - 0x000000F60FFFFFFF
Successfully added WC MTRR for [0xe0000000-0xefffffff]: 0;
[drm] Detected VRAM RAM=8176M, BAR=256M
[drm] RAM width 2048bits HBM
[TTM] Zone  kernel: Available graphics memory: 33496000 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator
[drm] amdgpu: 8176M of VRAM memory ready
[drm] amdgpu: 8176M of GTT memory ready.
i_size_write unimplemented
[drm] GART: num cpu pages 65536, num gpu pages 65536
[drm] PCIE GART of 256M enabled (table at 0x000000F400800000).
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sos.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_asd.bin
drmn0: successfully loaded firmware image with name: 
amdgpu/vega10_acg_smc.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_pfp.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_me.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_ce.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_rlc.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_mec.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_mec2.bin
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sdma.bin
drmn0: successfully loaded firmware image with name: amdgpu/vega10_sdma1.bin
[drm] use_doorbell being set to: [true]
i_size_write unimplemented
[drm] use_doorbell being set to: [true]
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_uvd.bin
[drm] Found UVD firmware Version: 65.29 Family ID: 17
[drm] PSP loading UVD firmware
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
drmn0: successfully loaded firmware image with name: amdgpu/vega10_vce.bin
[drm] Found VCE firmware Version: 57.4 Binary ID: 4
[drm] PSP loading VCE firmware
i_size_write unimplemented
i_size_write unimplemented
i_size_write unimplemented
[drm] Display Core initialized with v3.1.27!
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
amdgpu: [powerplay] Failed to send message: 0x4
[drm:amdgpu_ring_write] amdgpu: writing more dwords to the ring than 
expected!

root at venus:~ # sysctl -a compat.linuxkpi
compat.linuxkpi.drm_timestamp_precision_usec: 20
compat.linuxkpi.drm_vblankoffdelay: 5000
compat.linuxkpi.drm_poll: 1
compat.linuxkpi.drm_drm_fbdev_overalloc: 100
compat.linuxkpi.drm_fbdev_emulation: 1

Then it hangs...


After restart:

root at venus:/boot # ls -l kernel/drm*
-r-xr-xr-x  1 root  wheel  160440 Apr  8 12:08 kernel/drm.ko
-r-xr-xr-x  1 root  wheel  500088 Apr  8 12:08 kernel/drm2.ko
root at venus:/boot # ls -l modules/drm*
-r-xr-xr-x  1 root  wheel  850928 Apr  8 22:09 modules/drm.ko
root at venus:/boot # ls -l modules/amdgpu.ko
-r-xr-xr-x  1 root  wheel  4119152 Apr  8 22:09 modules/amdgpu.ko

root at venus:/boot # sysctl -a compat
compat.linux32.maxvmem: 0
compat.linux32.maxssiz: 67108864
compat.linux32.maxdsiz: 536870912
compat.linux.oss_version: 198144
compat.linux.osrelease: 2.6.36
compat.linux.osname: Linux
compat.ia32.maxvmem: 0
compat.ia32.maxssiz: 67108864
compat.ia32.maxdsiz: 536870912

GrzegorzJ



More information about the freebsd-ports mailing list