NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
kern/59275: amdgpu not attaching automatically but panics when added manually on boot and X is started
>Number: 59275
>Category: kern
>Synopsis: amdgpu not attaching automatically but panics when added manually on boot and X is started
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Thu Apr 10 13:40:00 +0000 2025
>Originator: Reinoud Zandijk
>Release: NetBSD 10.1_STABLE
>Organization:
>Environment:
System: NetBSD gorilla.13thmonkey.org 10.1_STABLE NetBSD 10.1_STABLE (GENERIC) #0: Fri Apr 4 16:24:50 UTC 2025 mkrepro%mkrepro.NetBSD.org@localhost:/usr/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
[ 1.019660] pci9 at ppb8 bus 9
[ 1.019660] pci9: i/o space, memory space enabled, rd/line, wr/inv ok
[ 1.019660] genfb0 at pci9 dev 0 function 0: ATI Technologies Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X (rev. 0xcf)
[ 1.019660] genfb0: framebuffer at 0x7e00000000, size 1024x768, depth 32, stride 4096
[ 1.019660] genfb0: shadow framebuffer enabled, size 3072 KB
[ 1.019660] wsdisplay0 at genfb0 kbdmux 1: console (default, vt100 emulation)
>Description:
After installing a pristine NetBSD/amd64 on a cleaned harddisc using sysinst,
the machine boots fine but it does not recognize nor attach the amdgpu and/or
drmkms. See environment above.
I have to manually load the modules at boot time to get something to work:
menu=Boot normally:rndseed /var/db/entropy-file;load drmkms_sched;load drmkms;load amdgpu;boot
I don't know if the order matters but this gives:
[ 1.021487] pci9 at ppb8 bus 9
[ 1.021487] pci9: i/o space, memory space enabled, rd/line, wr/inv ok
[ 1.021487] amdgpu0 at pci9 dev 0 function 0: ATI Technologies Radeon RX 460/560D / Pro 450/455/460/555/555X/560/560X (rev. 0xcf)
[ 1.021487] pci_mem_find: reserved mapping register type
...
This will create a working accelerated framebuffer for the console but X won't
work due to a panic:
[ 4.061800] kern.module.path=/stand/amd64/10.1/modules
[ 4.076153] [drm] initializing kernel modesetting (POLARIS11 0x1002:0x67EF 0x1458:0x22D6 0xCF).
[ 4.076153] [drm] register mmio base: 0xFCE00000
[ 4.076153] [drm] register mmio size: 262144
[ 4.076153] [drm] PCIE atomic ops is not supported
[ 4.076153] [drm] add ip block number 0 <vi_common>
[ 4.076153] [drm] add ip block number 1 <gmc_v8_0>
[ 4.076153] [drm] add ip block number 2 <tonga_ih>
[ 4.076153] [drm] add ip block number 3 <gfx_v8_0>
[ 4.082065] [drm] add ip block number 4 <sdma_v3_0>
[ 4.082065] [drm] add ip block number 5 <powerplay>
[ 4.082065] [drm] add ip block number 6 <dm>
[ 4.082065] [drm] add ip block number 7 <uvd_v6_0>
[ 4.082065] [drm] add ip block number 8 <vce_v3_0>
[ 4.082065] pci_mem_find: reserved mapping register type
[ 4.091804] ATOM BIOS: 113-TIC15322-X01
[ 4.091804] [drm] UVD is enabled in VM mode
[ 4.091804] [drm] UVD ENC is enabled in VM mode
[ 4.091804] [drm] VCE enabled in VM mode
[ 4.091804] [drm] vm size is 256 GB, 2 levels, block size is 10-bit, fragment size is 9-bit
[ 4.102215] amdgpu0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
[ 4.102215] amdgpu0: GART: 256M 0x000000FF00000000 - 0x000000FF0FFFFFFF
[ 4.111800] [drm] Detected VRAM RAM=2048M, BAR=4096M
[ 4.111800] [drm] RAM width 128bits GDDR5
[ 4.111800] Zone kernel: Available graphics memory: 9007199248558044 KiB
[ 4.111800] Zone dma32: Available graphics memory: 2097152 KiB
[ 4.111800] [drm] amdgpu: 2048M of VRAM memory ready
[ 4.111800] [drm] amdgpu: 3072M of GTT memory ready.
[ 4.111800] [drm] GART: num cpu pages 65536, num gpu pages 65536
[ 4.121801] [drm] PCIE GART of 256M enabled (table at 0x000000F400300000).
[ 4.121801] amdgpu0: interrupting at msi10 vec 0 (amdgpu0)
[ 4.121801] [drm] Chained IB support enabled!
[ 4.121801] hwmgr_sw_init smu backed is polaris10_smu
[ 4.121801] [drm] Found UVD firmware Version: 1.130 Family ID: 16
[ 4.121801] [drm] Found VCE firmware Version: 35.1a Binary ID: 3
[ 4.211799] [drm] DM_PPLIB: values for Engine clock
[ 4.211799] [drm] DM_PPLIB: 214000
[ 4.211799] [drm] DM_PPLIB: 481000
[ 4.211799] [drm] DM_PPLIB: 760000
[ 4.221991] [drm] DM_PPLIB: 1020000
[ 4.221991] [drm] DM_PPLIB: 1102000
[ 4.221991] [drm] DM_PPLIB: 1138000
[ 4.221991] [drm] DM_PPLIB: 1172000
[ 4.221991] [drm] DM_PPLIB: 1212000
[ 4.233197] [drm] DM_PPLIB: Validation clocks:
[ 4.233197] [drm] DM_PPLIB: engine_max_clock: 121200
[ 4.233197] [drm] DM_PPLIB: memory_max_clock: 175000
[ 4.233197] [drm] DM_PPLIB: level : 8
[ 4.242247] [drm] DM_PPLIB: values for Memory clock
[ 4.242247] [drm] DM_PPLIB: 300000
[ 4.242247] [drm] DM_PPLIB: 1750000
[ 4.242247] [drm] DM_PPLIB: Validation clocks:
[ 4.242247] [drm] DM_PPLIB: engine_max_clock: 121200
[ 4.253513] [drm] DM_PPLIB: memory_max_clock: 175000
[ 4.253513] [drm] DM_PPLIB: level : 8
[ 4.253513] warning: [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!
[ 4.253513] warning: [drm] dce110_link_encoder_construct: Failed to get encoder_cap_info from VBIOS with error code 4!
[ 4.262815] [drm] Display Core initialized with v3.2.69!
[ 4.311799] [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[ 4.322383] [drm] Driver supports precise vblank timestamp query.
[ 4.341798] [drm] UVD and UVD ENC initialized successfully.
[ 4.451798] [drm] VCE initialized successfully.
[ 4.461798] amdgpufb0 at amdgpu0
[ 4.461798] [drm] Initialized amdgpu 3.36.0 20150101 for amdgpu0 on minor 0
[ 4.461798] amdgpufb0: framebuffer at 0x7e00830000, size 3840x2160, depth 32, stride 15360
[ 4.561799] wsdisplay0 at amdgpufb0 kbdmux 1: console (default, vt100 emulation), using wskbd0
[ 4.561799] wsmux1: connecting to wsdisplay0
[ 17.781754] wsdisplay0: screen 1 added (default, vt100 emulation)
[ 17.781754] wsdisplay0: screen 2 added (default, vt100 emulation)
[ 17.781754] wsdisplay0: screen 3 added (default, vt100 emulation)
[ 17.781754] wsdisplay0: screen 4 added (default, vt100 emulation)
starting X
[ 53.611635] panic: unlocking unlocked wait/wound mutex: 0xfffff69b290f2120
[ 53.611635] cpu1: Begin traceback...
[ 53.611635] vpanic() at netbsd:vpanic+0x183
[ 53.611635] panic() at netbsd:panic+0x3c
[ 53.611635] cpu1: Begin traceback...
[ 53.611635] vpanic() at netbsd:vpanic+0x183
[ 53.611635] panic() at netbsd:panic+0x3c
[ 53.611635] linux_ww_mutex_unlock() at netbsd:linux_ww_mutex_unlock+0x9c
[ 53.621634] ttm_bo_release() at netbsd:ttm_bo_release+0xf3
[ 53.621634] amdgpu_bo_unref() at amdgpu:amdgpu_bo_unref+0x1d
[ 53.621634] amdgpu_vm_free_table() at amdgpu:amdgpu_vm_free_table+0x53
[ 53.621634] amdgpu_vm_free_pts() at amdgpu:amdgpu_vm_free_pts+0x6a
[ 53.621634] amdgpu_vm_fini() at amdgpu:amdgpu_vm_fini+0x270
[ 53.621634] amdgpu_driver_postclose_kms() at amdgpu:amdgpu_driver_postclose_kms+0x133
[ 53.621634] drm_file_free() at netbsd:drm_file_free+0x1fb
[ 53.621634] drm_close() at netbsd:drm_close+0x60
[ 53.621634] closef() at netbsd:closef+0x58
[ 53.621634] fd_close() at netbsd:fd_close+0x140
[ 53.621634] sys_close() at netbsd:sys_close+0x22
[ 53.621634] syscall() at netbsd:syscall+0x1fc
[ 53.621634] --- syscall (number 6) ---
[ 53.621634] netbsd:syscall+0x1fc:
[ 53.621634] cpu1: End traceback...
>How-To-Repeat:
Boot NetBSD/10.1 on a machine with a gpu supported by amdgpu, see it not
attaching, modify the boot.cfg as stated above, reboot, start X and see it
crash.
>Fix:
Chase the missing lock?
When it worked in my former install that used a -current kernel, X worked but
OpenGL rendering didn't work (endless waiting for Vsync IIRC) and I had to
disable access to /dev/dri/*. What struck me was that even when DRI disabled
this way, on switching backrounds in say xfce4, fragmented parts of the older
background remained visible in the newly uploaded image in little stripes very
remenisent of cache lines; as if the memory wasn't written out of the CPU
cache correctly to the mapped GPU memory before either side got unmapped. This
would also explain the issued with OpenGL as tables will get corrupted the
same way. Running spice-gtk also resulted in the same corruption only then
shown interactively.
>Unformatted:
Home |
Main Index |
Thread Index |
Old Index