Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Panic on boot with Renoir when testing drm-live-devel-20200906.img #23

Closed
dnebdal opened this issue Sep 11, 2020 · 4 comments
Closed

Panic on boot with Renoir when testing drm-live-devel-20200906.img #23

dnebdal opened this issue Sep 11, 2020 · 4 comments
Labels
amdgpu amdgpu related problems

Comments

@dnebdal
Copy link

dnebdal commented Sep 11, 2020

Thinkpad T14 Gen1 AMD
Ryzen 5 PRO 4650U with Radeon Graphics
FreeBSD 13.0-CURRENT 76ceb436904-271329(drm-devel)
(Specifically the image linked in freebsd-current by Emmanuel Vadot on Aug 31).

Issue:
Boots in EFI framebuffer. Prints a few errors, then panics. Until I figure out how to get a crash dump out of this, here is some hand transcription. The boot proceeds normally until "Loading kernel modules:", so I'll skip to there.

This should be entirely reproducible, so ask if there is anything you'd like me to provide.

Loading kernel modules:
<6>[drm] amdgpu kernel modesetting enabled
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
sysctl_warn_reuse: can't reuse a leaf (hw.dri.debug)!
<6>[drm] initializing kernel modesetting (RENOIR 0x1002:0x1636 0x17AA:0x5081 0xD3)
<6>[drm] register mmio base: 0xFD300000
<6>[drm] register mmio size 524288
<6>[drm] add ip block number 0 <soc15_common>
<6>[drm] add ip block number 1 <gmc_v9_0>
<6>[drm] add ip block number 2 <vega10_ih>
<6>[drm] add ip block number 3 <psp>
<6>[drm] add ip block number 4 <smu>
<6>[drm] add ip block number 5 <gfx_v9_0>
<6>[drm] add ip block number 6 <sdma_v4_0>
<6>[drm] add ip block number 7 <vcn_v2_0>
drm0: failed to link firmware kernel module with mapped name: amdgpu_renoir_gpu_info_bin
amdgpu/renoir_gpu_info.bin: could not load firmware image, error 2
amdgpu/renoir_gpu_info.bin: could not load firmware image, error 2
drmn0: failed to load firmware with name: amdgpu/renoir_gpu_info.bin
drmn0: failed to load gpu_info firmware: "amdgpu/renoir_gpu_info.bin"
drmn0: fatal error during GPU init
unregister_acpi_notifier not implemented -- see your local kernel hacker
<6>[drm] amdpu: finishing device.
panic: mtx_lock() of spin mutex (null) @ /wrkdirs/usr/ports/graphics/drm-devel-kmod/work/drm-kmod-drm_v5.4.62-devel/drivers/gpu/drm/amd/amdgpu/amdgpu_irq.c:112
cpuid = 10
time= 1599860909
KDB: stack backtrace:
db_trace_self_wrapper()  (I'll skip the addresses; see attached image)
vpanic()
panic()
__mtx_lock_flags()
amdgpu_irq_disable_all()
amdgpu_device_fini()
amdgpu_driver_unload_kms()
amdgpu_driver_load_kms()
drm_dev_register()
amdgpu_pci_probe()
linux_pci_attach_device()
device_attach()
device_probe_and_attach()
bus_generic_driver_added()
devclass_driver_added()
devclass_add_driver()
_linux_pci_register_driver()
amdgpu_evh()
module_register_init()
linker_load_module()
kern_kldload()
sys_kldload()
amd64_syscall()
fast_syscall_common()

IMG_20200911_221032

@evadot
Copy link
Contributor

evadot commented Sep 11, 2020

The issue is with unloading the amdgpu module, it never really worked but now instead of hanging the machine it panics (don't know if it's better or not :P).
It seems that gpu-firmware needs an update because we don't ship the renoir firmware which in turn causes the driver to unattach.
I'll update the gpu-firmware modules next week if no one beats me to it.
Thanks for the report.

@dnebdal
Copy link
Author

dnebdal commented Sep 12, 2020

Between the two, the panic seems ... better, I guess. :)

And yeah those firmware messages looked kind of relevant. I'll try again sometime next week.

@evadot
Copy link
Contributor

evadot commented Sep 14, 2020

I've updated the gpu-firmware-kmod ports to include the renoir firmware files.
I'll generate some new image this week.

@evadot evadot added the amdgpu amdgpu related problems label Sep 14, 2020
@evadot
Copy link
Contributor

evadot commented Oct 8, 2021

Closing this as this should work properly with the latest gpu-firmware-kmod port.
If that is not the case feel free to re-open the issue.

@evadot evadot closed this as completed Oct 8, 2021
evadot pushed a commit that referenced this issue Mar 29, 2022
The atomic check hooks must look up the encoder to be used with a
connector from the connector's atomic state, and not assume that it's
the connector's current attached encoder. The latter one can change
under the atomic check func, or can be unset yet as in the case of MST
connectors.

This fixes
[    7.940719] Oops: 0000 [#1] SMP NOPTI
[    7.944407] CPU: 2 PID: 143 Comm: kworker/2:2 Not tainted 5.6.0-1023-oem #23-Ubuntu
[    7.952102] Hardware name: Dell Inc. Latitude 7320/, BIOS 88.87.11 09/07/2020
[    7.959278] Workqueue: events output_poll_execute [drm_kms_helper]
[    7.965511] RIP: 0010:intel_psr_atomic_check+0x37/0xa0 [i915]
[    7.971327] Code: 80 2d 06 00 00 20 74 42 80 b8 34 71 00 00 00 74 39 48 8b 72 08 48 85 f6 74 30 80 b8 f8 71 00 00 00 74 27 4c 8b 87 80 04 00 00 <41> 8b 78 78 83 ff 08 77 19 31 c9 83 ff 05 77 19 48 81 c1 20 01 00
[    7.977541] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input5
[    7.990154] RSP: 0018:ffffb864c073fac8 EFLAGS: 00010202
[    7.990155] RAX: ffff8c5d55ce0000 RBX: ffff8c5d54519000 RCX: 0000000000000000
[    7.990155] RDX: ffff8c5d55cb30c0 RSI: ffff8c5d89a0c800 RDI: ffff8c5d55fcf800
[    7.990156] RBP: ffffb864c073fac8 R08: 0000000000000000 R09: ffff8c5d55d9f3a0
[    7.990156] R10: ffff8c5d55cb30c0 R11: 0000000000000009 R12: ffff8c5d55fcf800
[    7.990156] R13: ffff8c5d55cb30c0 R14: ffff8c5d56989cc0 R15: ffff8c5d56989cc0
[    7.990158] FS:  0000000000000000(0000) GS:ffff8c5d8e480000(0000) knlGS:0000000000000000
[    8.047193] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.052970] CR2: 0000000000000078 CR3: 0000000856500005 CR4: 0000000000760ee0
[    8.060137] PKRU: 55555554
[    8.062867] Call Trace:
[    8.065361]  intel_digital_connector_atomic_check+0x53/0x130 [i915]
[    8.071703]  intel_dp_mst_atomic_check+0x5b/0x200 [i915]
[    8.077074]  drm_atomic_helper_check_modeset+0x1db/0x790 [drm_kms_helper]
[    8.083942]  intel_atomic_check+0x92/0xc50 [i915]
[    8.088705]  ? drm_plane_check_pixel_format+0x4f/0xb0 [drm]
[    8.094345]  ? drm_atomic_plane_check+0x7a/0x3a0 [drm]
[    8.099548]  drm_atomic_check_only+0x2b1/0x450 [drm]
[    8.104573]  drm_atomic_commit+0x18/0x50 [drm]
[    8.109070]  drm_client_modeset_commit_atomic+0x1c9/0x200 [drm]
[    8.115056]  drm_client_modeset_commit_force+0x55/0x160 [drm]
[    8.120866]  drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xb0 [drm_kms_helper]
[    8.128415]  drm_fb_helper_set_par+0x34/0x50 [drm_kms_helper]
[    8.134225]  drm_fb_helper_hotplug_event.part.0+0xb4/0xe0 [drm_kms_helper]
[    8.141150]  drm_fb_helper_hotplug_event+0x1c/0x30 [drm_kms_helper]
[    8.147481]  intel_fbdev_output_poll_changed+0x6f/0xa0 [i915]
[    8.153287]  drm_kms_helper_hotplug_event+0x2c/0x40 [drm_kms_helper]
[    8.159709]  output_poll_execute+0x1aa/0x1c0 [drm_kms_helper]
[    8.165506]  process_one_work+0x1e8/0x3b0
[    8.169561]  worker_thread+0x4d/0x400
[    8.173249]  kthread+0x104/0x140
[    8.176515]  ? process_one_work+0x3b0/0x3b0
[    8.180726]  ? kthread_park+0x90/0x90
[    8.184416]  ret_from_fork+0x1f/0x40

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2361
References: https://gitlab.freedesktop.org/drm/intel/-/issues/2486
Reported-by: William Tseng <[email protected]>
Reported-by: Cooper Chiou <[email protected]>
Cc: <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Anshuman Gupta <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 00e5deb5c4f5fe367311465e720e65cfa1178792)
Signed-off-by: Rodrigo Vivi <[email protected]>
evadot pushed a commit that referenced this issue Mar 29, 2022
The atomic check hooks must look up the encoder to be used with a
connector from the connector's atomic state, and not assume that it's
the connector's current attached encoder. The latter one can change
under the atomic check func, or can be unset yet as in the case of MST
connectors.

This fixes
[    7.940719] Oops: 0000 [#1] SMP NOPTI
[    7.944407] CPU: 2 PID: 143 Comm: kworker/2:2 Not tainted 5.6.0-1023-oem #23-Ubuntu
[    7.952102] Hardware name: Dell Inc. Latitude 7320/, BIOS 88.87.11 09/07/2020
[    7.959278] Workqueue: events output_poll_execute [drm_kms_helper]
[    7.965511] RIP: 0010:intel_psr_atomic_check+0x37/0xa0 [i915]
[    7.971327] Code: 80 2d 06 00 00 20 74 42 80 b8 34 71 00 00 00 74 39 48 8b 72 08 48 85 f6 74 30 80 b8 f8 71 00 00 00 74 27 4c 8b 87 80 04 00 00 <41> 8b 78 78 83 ff 08 77 19 31 c9 83 ff 05 77 19 48 81 c1 20 01 00
[    7.977541] input: PS/2 Generic Mouse as /devices/platform/i8042/serio1/input/input5
[    7.990154] RSP: 0018:ffffb864c073fac8 EFLAGS: 00010202
[    7.990155] RAX: ffff8c5d55ce0000 RBX: ffff8c5d54519000 RCX: 0000000000000000
[    7.990155] RDX: ffff8c5d55cb30c0 RSI: ffff8c5d89a0c800 RDI: ffff8c5d55fcf800
[    7.990156] RBP: ffffb864c073fac8 R08: 0000000000000000 R09: ffff8c5d55d9f3a0
[    7.990156] R10: ffff8c5d55cb30c0 R11: 0000000000000009 R12: ffff8c5d55fcf800
[    7.990156] R13: ffff8c5d55cb30c0 R14: ffff8c5d56989cc0 R15: ffff8c5d56989cc0
[    7.990158] FS:  0000000000000000(0000) GS:ffff8c5d8e480000(0000) knlGS:0000000000000000
[    8.047193] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[    8.052970] CR2: 0000000000000078 CR3: 0000000856500005 CR4: 0000000000760ee0
[    8.060137] PKRU: 55555554
[    8.062867] Call Trace:
[    8.065361]  intel_digital_connector_atomic_check+0x53/0x130 [i915]
[    8.071703]  intel_dp_mst_atomic_check+0x5b/0x200 [i915]
[    8.077074]  drm_atomic_helper_check_modeset+0x1db/0x790 [drm_kms_helper]
[    8.083942]  intel_atomic_check+0x92/0xc50 [i915]
[    8.088705]  ? drm_plane_check_pixel_format+0x4f/0xb0 [drm]
[    8.094345]  ? drm_atomic_plane_check+0x7a/0x3a0 [drm]
[    8.099548]  drm_atomic_check_only+0x2b1/0x450 [drm]
[    8.104573]  drm_atomic_commit+0x18/0x50 [drm]
[    8.109070]  drm_client_modeset_commit_atomic+0x1c9/0x200 [drm]
[    8.115056]  drm_client_modeset_commit_force+0x55/0x160 [drm]
[    8.120866]  drm_fb_helper_restore_fbdev_mode_unlocked+0x54/0xb0 [drm_kms_helper]
[    8.128415]  drm_fb_helper_set_par+0x34/0x50 [drm_kms_helper]
[    8.134225]  drm_fb_helper_hotplug_event.part.0+0xb4/0xe0 [drm_kms_helper]
[    8.141150]  drm_fb_helper_hotplug_event+0x1c/0x30 [drm_kms_helper]
[    8.147481]  intel_fbdev_output_poll_changed+0x6f/0xa0 [i915]
[    8.153287]  drm_kms_helper_hotplug_event+0x2c/0x40 [drm_kms_helper]
[    8.159709]  output_poll_execute+0x1aa/0x1c0 [drm_kms_helper]
[    8.165506]  process_one_work+0x1e8/0x3b0
[    8.169561]  worker_thread+0x4d/0x400
[    8.173249]  kthread+0x104/0x140
[    8.176515]  ? process_one_work+0x3b0/0x3b0
[    8.180726]  ? kthread_park+0x90/0x90
[    8.184416]  ret_from_fork+0x1f/0x40

Closes: https://gitlab.freedesktop.org/drm/intel/-/issues/2361
References: https://gitlab.freedesktop.org/drm/intel/-/issues/2486
Reported-by: William Tseng <[email protected]>
Reported-by: Cooper Chiou <[email protected]>
Cc: <[email protected]>
Signed-off-by: Imre Deak <[email protected]>
Reviewed-by: Anshuman Gupta <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
(cherry picked from commit 00e5deb5c4f5fe367311465e720e65cfa1178792)
Signed-off-by: Rodrigo Vivi <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
amdgpu amdgpu related problems
Projects
None yet
Development

No branches or pull requests

2 participants