Bug 234760 - graphics/drm-fbsd12.0-kmod crash with AMD A10-7890K
Summary: graphics/drm-fbsd12.0-kmod crash with AMD A10-7890K
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-x11 mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-01-08 17:56 UTC by skrech
Modified: 2019-07-10 08:50 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description skrech 2019-01-08 17:56:11 UTC
Hello,

After updating yesterday to the newest version of drm-fbsd12.0-kmod-4.16.g20181215 I experience sudden crashes at random time.
My video card is an APU:
AMD A10-7890K Radeon R7, 12 Compute Cores 4C+8G (4092.64-MHz K8-class CPU)

I have kld_list="/boot/modules/radeonkms.ko" in rc.conf.

/var/log/messages:
Init code:
Jan  6 16:59:05 schCube kernel: [drm:radeon_device_init] Unable to find PCI I/O BAR
Jan  6 16:59:05 schCube kernel: pci_is_thunderbolt_attached not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: [drm:radeon_atombios_init] Unable to find PCI I/O BAR; using MMIO for ATOM IIO
Jan  6 16:59:05 schCube kernel: ATOM BIOS: 113
Jan  6 16:59:05 schCube kernel: efi_enabled not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: drmn0: VRAM: 1024M 0x0000000000000000 - 0x000000003FFFFFFF (1024M used)
Jan  6 16:59:05 schCube kernel: drmn0: GTT: 2048M 0x0000000040000000 - 0x00000000BFFFFFFF
Jan  6 16:59:05 schCube kernel: Successfully added WC MTRR for [0xc0000000-0xcfffffff]: 0; 
Jan  6 16:59:05 schCube kernel: [drm] Detected VRAM RAM=1024M, BAR=256M
Jan  6 16:59:05 schCube kernel: [drm] RAM width 128bits DDR
Jan  6 16:59:05 schCube kernel: [TTM] Zone  kernel: Available graphics memory: 7815064 kiB
Jan  6 16:59:05 schCube kernel: [TTM] Zone   dma32: Available graphics memory: 2097152 kiB
Jan  6 16:59:05 schCube kernel: [TTM] Initializing pool allocator
Jan  6 16:59:05 schCube kernel: [drm] radeon: 1024M of VRAM memory ready
Jan  6 16:59:05 schCube kernel: [drm] radeon: 2048M of GTT memory ready.
Jan  6 16:59:05 schCube kernel: [drm] Loading kaveri Microcode
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_pfp.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_me.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_ce.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_mec.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_mec2.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_rlc.bin
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/kaveri_sdma.bin
Jan  6 16:59:05 schCube kernel: [drm] Internal thermal controller without fan control
Jan  6 16:59:05 schCube kernel: [drm] radeon: dpm initialized
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/bonaire_uvd.bin
Jan  6 16:59:05 schCube kernel: [drm] Found UVD firmware Version: 1.64 Family ID: 9
Jan  6 16:59:05 schCube kernel: drmn0: successfully loaded firmware image with name: radeon/BONAIRE_vce.bin
Jan  6 16:59:05 schCube kernel: [drm] Found VCE firmware/feedback version 40.2.2 / 15!
Jan  6 16:59:05 schCube kernel: [drm] GART: num cpu pages 524288, num gpu pages 524288
Jan  6 16:59:05 schCube kernel: [drm] PCIE GART of 2048M enabled (table at 0x000000000030E000).
Jan  6 16:59:05 schCube kernel: drmn0: WB enabled
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 0 use gpu addr 0x0000000040000c00 and cpu addr 0x0xfffff8004272ec00
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 1 use gpu addr 0x0000000040000c04 and cpu addr 0x0xfffff8004272ec04
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 2 use gpu addr 0x0000000040000c08 and cpu addr 0x0xfffff8004272ec08
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 3 use gpu addr 0x0000000040000c0c and cpu addr 0x0xfffff8004272ec0c
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 4 use gpu addr 0x0000000040000c10 and cpu addr 0x0xfffff8004272ec10
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 5 use gpu addr 0x0000000000078d30 and cpu addr 0x0xfffff800c0078d30
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 6 use gpu addr 0x0000000040000c18 and cpu addr 0x0xfffff8004272ec18
Jan  6 16:59:05 schCube kernel: drmn0: fence driver on ring 7 use gpu addr 0x0000000040000c1c and cpu addr 0x0xfffff8004272ec1c
Jan  6 16:59:05 schCube kernel: [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
Jan  6 16:59:05 schCube kernel: [drm] Driver supports precise vblank timestamp query.
Jan  6 16:59:05 schCube kernel: [drm] radeon: irq initialized.
Jan  6 16:59:05 schCube kernel: pm_runtime_mark_last_busy not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: [drm] ring test on 0 succeeded in 3 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 1 succeeded in 2 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 2 succeeded in 2 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 3 succeeded in 3 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 4 succeeded in 3 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 5 succeeded in 2 usecs
Jan  6 16:59:05 schCube kernel: [drm] UVD initialized successfully.
Jan  6 16:59:05 schCube kernel: [drm] ring test on 6 succeeded in 22 usecs
Jan  6 16:59:05 schCube kernel: [drm] ring test on 7 succeeded in 3 usecs
Jan  6 16:59:05 schCube kernel: [drm] VCE initialized successfully.
Jan  6 16:59:05 schCube kernel: [drm] ib test on ring 0 succeeded in 0 usecs
Jan  6 16:59:05 schCube kernel: [drm] ib test on ring 1 succeeded in 0 usecs
Jan  6 16:59:05 schCube kernel: [drm] ib test on ring 2 succeeded in 0 usecs
Jan  6 16:59:05 schCube kernel: [drm] ib test on ring 3 succeeded in 0 usecs
Jan  6 16:59:05 schCube kernel: [drm] ib test on ring 4 succeeded in 0 usecs
Jan  6 16:59:05 schCube kernel: [drm:uvd_v1_0_ib_test] radeon: fence wait timed out.
Jan  6 16:59:05 schCube kernel: [drm:radeon_ib_ring_tests] radeon: failed testing IB on ring 5 (-60).
Jan  6 16:59:05 schCube kernel: [drm:radeon_vce_ib_test] radeon: fence wait timed out.
Jan  6 16:59:05 schCube kernel: [drm:radeon_ib_ring_tests] radeon: failed testing IB on ring 6 (-60).
Jan  6 16:59:05 schCube kernel: [drm:radeon_vce_ib_test] radeon: fence wait timed out.
Jan  6 16:59:05 schCube kernel: [drm:radeon_ib_ring_tests] radeon: failed testing IB on ring 7 (-60).
Jan  6 16:59:05 schCube kernel: [drm] Connector DVI-D-1: get mode from tunables:
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.modes.DVI-D-1
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.default_mode
Jan  6 16:59:05 schCube kernel: [drm] Connector HDMI-A-1: get mode from tunables:
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.modes.HDMI-A-1
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.default_mode
Jan  6 16:59:05 schCube kernel: [drm] Connector HDMI-A-2: get mode from tunables:
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.modes.HDMI-A-2
Jan  6 16:59:05 schCube kernel: [drm]   - kern.vt.fb.default_mode
Jan  6 16:59:05 schCube kernel: [drm] Radeon Display Connectors
Jan  6 16:59:05 schCube kernel: [drm] Connector 0:
Jan  6 16:59:05 schCube kernel: [drm]   DVI-D-1
Jan  6 16:59:05 schCube kernel: [drm]   HPD3
Jan  6 16:59:05 schCube kernel: [drm]   DDC: 0x6550 0x6550 0x6554 0x6554 0x6558 0x6558 0x655c 0x655c
Jan  6 16:59:05 schCube kernel: [drm]   Encoders:
Jan  6 16:59:05 schCube kernel: [drm]     DFP3: INTERNAL_UNIPHY2
Jan  6 16:59:05 schCube kernel: [drm] Connector 1:
Jan  6 16:59:05 schCube kernel: [drm]   HDMI-A-1
Jan  6 16:59:05 schCube kernel: [drm]   HPD1
Jan  6 16:59:05 schCube kernel: [drm]   DDC: 0x6530 0x6530 0x6534 0x6534 0x6538 0x6538 0x653c 0x653c
Jan  6 16:59:05 schCube kernel: [drm]   Encoders:
Jan  6 16:59:05 schCube kernel: [drm]     DFP1: INTERNAL_UNIPHY
Jan  6 16:59:05 schCube kernel: [drm] Connector 2:
Jan  6 16:59:05 schCube kernel: [drm]   HDMI-A-2
Jan  6 16:59:05 schCube kernel: [drm]   HPD
Jan  6 16:59:05 schCube kernel: [drm]   DDC: 0x6540 0x6540 0x6544 0x6544 0x6548 0x6548 0x654c 0x654c
Jan  6 16:59:05 schCube kernel: [drm]   Encoders:
Jan  6 16:59:05 schCube kernel: [drm]     DFP2: INTERNAL_UNIPHY3
Jan  6 16:59:05 schCube kernel: __pm_runtime_resume not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: pm_runtime_mark_last_busy not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: __pm_runtime_suspend not implemented -- see your local kernel hacker
Jan  6 16:59:05 schCube kernel: [drm] fb mappable at 0xC0722000
Jan  6 16:59:05 schCube kernel: [drm] vram apper at 0xC0000000
Jan  6 16:59:05 schCube kernel: [drm] size 8294400
Jan  6 16:59:05 schCube kernel: [drm] fb depth is 24
Jan  6 16:59:05 schCube kernel: [drm]    pitch is 7680

First time crash:
Jan  6 17:40:28 schCube kernel: Fatal trap 12: page fault while in kernel mode
Jan  6 17:40:28 schCube kernel: cpuid = 3; apic id = 13
Jan  6 17:40:28 schCube kernel: fault virtual address   = 0x11d8
Jan  6 17:40:28 schCube kernel: fault code              = supervisor read data, page not present
Jan  6 17:40:28 schCube kernel: instruction pointer     = 0x20:0xffffffff82fc5a94
Jan  6 17:40:28 schCube kernel: stack pointer           = 0x28:0xfffffe009db2aeb0
Jan  6 17:40:28 schCube kernel: frame pointer           = 0x28:0xfffffe009db2aee0
Jan  6 17:40:28 schCube kernel: code segment            = base rx0, limit 0xfffff, type 0x1b
Jan  6 17:40:28 schCube kernel:                         = DPL 0, pres 1, long 1, def32 0, gran 1
Jan  6 17:40:28 schCube kernel: processor eflags        = interrupt enabled, resume, IOPL = 0
Jan  6 17:40:28 schCube kernel: current process         = 1470 (radeon_cs:0)
Jan  6 17:40:28 schCube kernel: trap number             = 12
Jan  6 17:40:28 schCube kernel: panic: page fault
Jan  6 17:40:28 schCube kernel: cpuid = 3
Jan  6 17:40:28 schCube kernel: time = 1546789153
Jan  6 17:40:28 schCube kernel: KDB: stack backtrace:
Jan  6 17:40:28 schCube kernel: #0 0xffffffff80be7977 at kdb_backtrace+0x67
Jan  6 17:40:28 schCube kernel: #1 0xffffffff80b9b563 at vpanic+0x1a3
Jan  6 17:40:28 schCube kernel: #2 0xffffffff80b9b3b3 at panic+0x43
Jan  6 17:40:28 schCube kernel: #3 0xffffffff8107496f at trap_fatal+0x35f
Jan  6 17:40:28 schCube kernel: #4 0xffffffff810749c9 at trap_pfault+0x49
Jan  6 17:40:28 schCube kernel: #5 0xffffffff81073fee at trap+0x29e
Jan  6 17:40:28 schCube kernel: #6 0xffffffff8104f1d5 at calltrap+0x8
Jan  6 17:40:28 schCube kernel: #7 0xffffffff82fdd9c1 at radeon_sa_bo_new+0x361
Jan  6 17:40:28 schCube kernel: #8 0xffffffff82fccd91 at radeon_ib_get+0x31
Jan  6 17:40:28 schCube kernel: #9 0xffffffff82fe7873 at radeon_vm_update_page_directory+0x83
Jan  6 17:40:28 schCube kernel: #10 0xffffffff82fb87f6 at radeon_cs_ioctl+0x866
Jan  6 17:40:28 schCube kernel: #11 0xffffffff830b3cd6 at drm_ioctl_kernel+0xf6
Jan  6 17:40:28 schCube kernel: #12 0xffffffff830b3f71 at drm_ioctl+0x281
Jan  6 17:40:28 schCube kernel: #13 0xffffffff82fc38ae at radeon_drm_ioctl+0x4e
Jan  6 17:40:28 schCube kernel: #14 0xffffffff83104bd4 at linux_file_ioctl+0x204
Jan  6 17:40:28 schCube kernel: #15 0xffffffff80c04f3d at kern_ioctl+0x26d
Jan  6 17:40:28 schCube kernel: #16 0xffffffff80c04c5e at sys_ioctl+0x15e
Jan  6 17:40:28 schCube kernel: #17 0xffffffff81075449 at amd64_syscall+0x369

Second time crash:
Jan  6 18:26:27 schCube kernel: panic: BUG ON ret failed at /wrkdirs/usr/ports/graphics/drm-fbsd12.0-kmod/work/kms-drm-71fcc9f/drivers/gpu/drm/ttm/ttm_tt.c:259
Jan  6 18:26:27 schCube kernel: cpuid = 3
Jan  6 18:26:27 schCube kernel: time = 1546791911
Jan  6 18:26:27 schCube kernel: KDB: stack backtrace:
Jan  6 18:26:27 schCube kernel: #0 0xffffffff80be7977 at kdb_backtrace+0x67
Jan  6 18:26:27 schCube kernel: #1 0xffffffff80b9b563 at vpanic+0x1a3
Jan  6 18:26:27 schCube kernel: #2 0xffffffff80b9b3b3 at panic+0x43
Jan  6 18:26:27 schCube kernel: #3 0xffffffff830d58e3 at ttm_tt_destroy+0xb3
Jan  6 18:26:27 schCube kernel: #4 0xffffffff830db4e7 at ttm_bo_cleanup_refs_or_queue+0x1d7
Jan  6 18:26:27 schCube kernel: #5 0xffffffff830d7b21 at ttm_bo_unref+0x81
Jan  6 18:26:27 schCube kernel: #6 0xffffffff82fd5b02 at radeon_bo_unref+0x22
Jan  6 18:26:27 schCube kernel: #7 0xffffffff82fc88de at radeon_gem_object_free+0x1e
Jan  6 18:26:27 schCube kernel: #8 0xffffffff830b0634 at drm_gem_object_release_handle+0xd4
Jan  6 18:26:27 schCube kernel: #9 0xffffffff830b04fe at drm_gem_handle_delete+0x8e
Jan  6 18:26:27 schCube kernel: #10 0xffffffff830b3cd6 at drm_ioctl_kernel+0xf6
Jan  6 18:26:27 schCube kernel: #11 0xffffffff830b3f71 at drm_ioctl+0x281
Jan  6 18:26:27 schCube kernel: #12 0xffffffff82fc38ae at radeon_drm_ioctl+0x4e
Jan  6 18:26:27 schCube kernel: #13 0xffffffff83104bd4 at linux_file_ioctl+0x204
Jan  6 18:26:27 schCube kernel: #14 0xffffffff80c04f3d at kern_ioctl+0x26d
Jan  6 18:26:27 schCube kernel: #15 0xffffffff80c04c5e at sys_ioctl+0x15e
Jan  6 18:26:27 schCube kernel: #16 0xffffffff81075449 at amd64_syscall+0x369
Jan  6 18:26:27 schCube kernel: #17 0xffffffff8104fabd at fast_syscall_common+0x101
Comment 1 skrech 2019-01-19 08:48:44 UTC
Hey,

If you need some additional info, I'd be glad to provide it.
Comment 2 Ivan 2019-01-26 19:21:38 UTC
I have panics after update too.

Fatal trap 12: page fault while in kernel mode
cpuid = 3; apic id = 03
fault virtual address   = 0x11d8
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff82cc1a94
stack pointer           = 0x28:0xfffffe0090d10040
frame pointer           = 0x28:0xfffffe0090d10070
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 3
current process         = 2005 (Xorg:rcs0)
trap number             = 12
panic: page fault
cpuid = 3
time = 1548497261
KDB: stack backtrace:
#0 0xffffffff80be7977 at kdb_backtrace+0x67
#1 0xffffffff80b9b563 at vpanic+0x1a3
#2 0xffffffff80b9b3b3 at panic+0x43
#3 0xffffffff8107496f at trap_fatal+0x35f
#4 0xffffffff810749c9 at trap_pfault+0x49
#5 0xffffffff81073fee at trap+0x29e
#6 0xffffffff8104f1d5 at calltrap+0x8
#7 0xffffffff82cd99c1 at radeon_sa_bo_new+0x361
#8 0xffffffff82cc8d91 at radeon_ib_get+0x31
#9 0xffffffff82cb41ef at radeon_cs_ioctl+0x25f
#10 0xffffffff82dafcd6 at drm_ioctl_kernel+0xf6
#11 0xffffffff82daff71 at drm_ioctl+0x281
#12 0xffffffff82cbf8ae at radeon_drm_ioctl+0x4e
#13 0xffffffff82e00bd4 at linux_file_ioctl+0x204
#14 0xffffffff80c04f3d at kern_ioctl+0x26d
#15 0xffffffff80c04c5e at sys_ioctl+0x15e
#16 0xffffffff81075449 at amd64_syscall+0x369
#17 0xffffffff8104fabd at fast_syscall_common+0x101

vgapci0@pci0:4:0:0:     class=0x030000 card=0x30251043 chip=0x677b1002 rev=0x00 hdr=0x00
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Caicos PRO [Radeon HD 7450]'
    class      = display
    subclass   = VGA
Comment 3 Niclas Zeising freebsd_committer 2019-01-30 09:44:40 UTC
Have (In reply to skrech from comment #0)

Have you tried using amdgpu instead?
What happens if you try on 12-stable or current?
Comment 4 Niclas Zeising freebsd_committer 2019-01-30 09:46:49 UTC
(In reply to Niclas Zeising from comment #3)
You can also try with drm-fbsd11.2-kmod if you are still on 12.0-release, and see if the issue goes away.
Comment 5 Ivan 2019-01-30 17:55:11 UTC
I believe amdgpu doesn't support Caicos PRO [Radeon HD 7450].
I'd reverted to r487117 and panics disappeared.
Comment 6 Niclas Zeising freebsd_committer 2019-01-30 18:01:46 UTC
(In reply to Ivan from comment #5)

It should be supported by either module.
Comment 7 skrech 2019-01-31 16:39:53 UTC
(In reply to Niclas Zeising from comment #3)

I've tried to change to "amdgpu" but the PC freezes on boot with some graphical glitches on the screen.
Comment 8 skrech 2019-01-31 16:56:06 UTC
(In reply to skrech from comment #7)

I'm using EFI boot btw. I'll try with drm-fbsd11.2-kmod and drm-current-kmod in several days.
Comment 9 Niclas Zeising freebsd_committer 2019-02-01 12:46:00 UTC
(In reply to skrech from comment #8)

WHen using amdgpu, you might need to add hw.sysconf.disable=1 to /boot/loader.conf.
This will make the console black until the drm module is loaded.
Comment 10 Niclas Zeising freebsd_committer 2019-02-01 22:15:10 UTC
(In reply to Niclas Zeising from comment #9)

hw.syscons.disable=1 is the right name.
Comment 11 Ivan 2019-02-05 19:44:33 UTC
(In reply to Niclas Zeising from comment #6)
How can it be supported? amdgpu doesn't have firmware for caicos cards.
Comment 12 skrech 2019-04-01 08:30:31 UTC
After switching to "amdgpu" and added hw.syscons.disable=1 in /boot/loader.conf I'm able to boot and use the amdgpu driver and there are no crashes anymore. I'm using this configuration for one week now.

Thank you!
Comment 13 Niclas Zeising freebsd_committer 2019-07-10 08:50:45 UTC
Submitter reports issues are resolved.