FreeBSDDesktop / kms-drm

the DRM part of the linuxkpi-based KMS
63 stars 26 forks source link

panic when loading radeonkms on 11.4-release-p4 with Radeon R5 230 #251

Closed tingox closed 3 years ago

tingox commented 4 years ago

I have been using radeonkms from the drm* packages for many months now on FreeBSD 11. The relevant packages are

root@kg-core2# pkg info drm*
drm-fbsd11.2-kmod-4.11g20200420
drm-kmod-g20190710
drm_info-2.2.0_1
root@kg-core2# pkg info gpu*
gpu-firmware-kmod-g20200503

Last night I upgraded from FreeBSD 11.3-release-p14 to FreeBSD 11.4-release-p4, and now I get panics when I try to load the radeonkms module. From /var/log/messages

[drm] radeon 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 (CAICOS 0x1002:0x677B 0x1462:0x8099 0x00).
[drm] register mmio base: 0xFCE20000
[drm] register mmio size: 131072
[drm:radeon_device_init] Unable to find PCI I/O BAR
[drm:radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
ATOM BIOS: 113
drmn0: VRAM: 2048M 0x0000000000000000 - 0x000000007FFFFFFF (2048M used)
drmn0: GTT: 1024M 0x0000000080000000 - 0x00000000BFFFFFFF
[drm] Detected VRAM RAM=2048M, BAR=256M
[drm] RAM width 64bits DDR
[TTM] Zone  kernel: Available graphics memory: 33512064 kiB
[TTM] Zone   dma32: Available graphics memory: 2097152 kiB
[TTM] Initializing pool allocator

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0xfffffe62919678d8
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff82602882
stack pointer           = 0x28:0xfffffe104d48af10
frame pointer           = 0x28:0xfffffe104d48af30
code segment            = base 0x0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 100 (kldload)
trap number             = 12
panic: page fault
cpuid = 3
KDB: stack backtrace:
#0 0xffffffff80b43105 at kdb_backtrace+0x65
#1 0xffffffff80afd20e at vpanic+0x15e
#2 0xffffffff80afd0a3 at panic+0x43
#3 0xffffffff80f75fc5 at trap_fatal+0x365
#4 0xffffffff80f76019 at trap_pfault+0x49
#5 0xffffffff80f756ce at trap+0x27e
#6 0xffffffff80f5545f at calltrap+0x8
#7 0xffffffff82611e6c at reservation_object_wait_timeout_rcu+0x6c
#8 0xffffffff826238f8 at ttm_bo_wait+0x48
#9 0xffffffff824f109d at radeon_bo_move+0x2d
#10 0xffffffff82624f4e at ttm_bo_handle_move_mem+0x1ce
#11 0xffffffff82621e04 at ttm_bo_validate+0xd4
#12 0xffffffff8262228a at ttm_bo_init+0x37a
#13 0xffffffff824e54e1 at radeon_bo_create+0x1a1
#14 0xffffffff824efc5f at radeon_ttm_init+0x21f
#15 0xffffffff82473fc3 at evergreen_init+0x103
#16 0xffffffff824cc8f5 at radeon_device_init+0xd15
#17 0xffffffff824ddf2c at radeon_driver_load_kms+0x13c
Uptime: 1s

Let me know if there is any more info I can provide.

tingox commented 4 years ago

This appears have have been fixed by removing the drm-kmod, drm-fbsd11.2-kmod and gpu-firmware-kmod packages and rebuilding them from ports. At least the machine doesn't crash when I load the radonkms module, and it is working normally so far (about 1h30mins uptime now).

tingox commented 3 years ago

As this has been fixed by a straight recompile, I don't think more info will provide better insight here, so I'm closing this issue. If any developer want more info and think I can provide it, feel free to reopen.