Kernel panic after resume in dcn32_determine_det_override()
Brief summary of the problem:
Somewhat randomly (I'd say 1/3 times), when waking up from sleep, one screen doesn't wake up. It seems tied to a kernel panic in amdgpu. It is a regression.
Hardware description:
- CPU: AMD Ryzen 5 3600
- GPU: Radeon RX 7900 XT
- System Memory: 16GB
- Display(s): 3 displays
- Type of Display Connection: DP with a DVI adapter
System information:
- Distro name and Version: Archlinux
- Kernel version: Linux haruko 6.3.5-arch1-1 #1 (closed) SMP PREEMPT_DYNAMIC Tue, 30 May 2023 13:44:01 +0000 x86_64 GNU/Linux
- Custom kernel: N/A
- AMD official driver version: N/A
How to reproduce the issue:
- Wake up from sleep
- Kernel panic happens, screen stays black
Attached files:
Log files (for system lockups / game freezes / crashes)
[ 5953.324872] ------------[ cut here ]------------
[ 5953.324877] WARNING: CPU: 8 PID: 1476 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn32/dcn32_resource_helpers.c:329 dcn32_determine_det_override+0x11f/0x350 [amdgpu]
[ 5953.325441] Modules linked in: snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cfg80211 rfkill nft_reject_inet nf_reject_ipv4 nf_reject_ipv6 nft_reject nft_limit nft_ct nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 nf_tables nfnetlink vfat fat snd_hda_codec_realtek snd_hda_codec_generic amdgpu ledtrig_audio snd_hda_codec_hdmi snd_hda_intel intel_rapl_msr snd_intel_dspcfg intel_rapl_common snd_intel_sdw_acpi drm_buddy edac_mce_amd snd_hda_codec gpu_sched snd_hda_core video kvm_amd r8169 snd_hwdep i2c_algo_bit realtek snd_pcm drm_ttm_helper kvm ucsi_ccg ttm snd_timer typec_ucsi mdio_devres irqbypass drm_display_helper typec snd sp5100_tco gigabyte_wmi wmi_bmof libphy rapl cec pcspkr roles k10temp i2c_piix4 soundcore wmi gpio_amdpt gpio_generic mousedev joydev acpi_cpufreq mac_hid pkcs8_key_parser dm_multipath crypto_user fuse loop zram bpf_preload ip_tables x_tables usbhid dm_crypt cbc encrypted_keys trusted asn1_encoder tee dm_mod crct10dif_pclmul crc32_pclmul polyval_clmulni nvme polyval_generic gf128mul
[ 5953.325513] ghash_clmulni_intel sha512_ssse3 aesni_intel crypto_simd cryptd nvme_core ccp xhci_pci xhci_pci_renesas nvme_common btrfs blake2b_generic xor raid6_pq libcrc32c crc32c_generic crc32c_intel
[ 5953.325528] CPU: 8 PID: 1476 Comm: sway Not tainted 6.3.5-arch1-1 #1 649d963afc0261175aabf0511660febbb7b06177
[ 5953.325531] Hardware name: Gigabyte Technology Co., Ltd. B450M DS3H/B450M DS3H-CF, BIOS F42h 10/18/2019
[ 5953.325533] RIP: 0010:dcn32_determine_det_override+0x11f/0x350 [amdgpu]
[ 5953.326065] Code: 02 00 00 48 83 c4 50 5b 5d 41 5c 41 5d 41 5e 41 5f e9 d5 cb 9c c9 44 8b 44 24 24 44 8b 54 24 28 45 85 c0 74 07 45 85 d2 74 02 <0f> 0b 45 39 d0 0f 8c 6a 01 00 00 44 89 c0 c7 44 24 0c 01 00 00 00
[ 5953.326068] RSP: 0018:ffffaca509d37708 EFLAGS: 00010202
[ 5953.326070] RAX: 0000000000000002 RBX: 0000000000000002 RCX: ffff94d4f1140000
[ 5953.326072] RDX: 0000000000023b4a RSI: 0000000000000002 RDI: ffff94d518f8e000
[ 5953.326074] RBP: ffff94d4d7cc0000 R08: 0000000000082302 R09: ffff94d4d7cc0000
[ 5953.326075] R10: 0000000000023b4a R11: 0000000000000002 R12: ffff94d518f8e000
[ 5953.326077] R13: ffff94d518f8e298 R14: 0000000000000004 R15: ffff94d4d7cc25b0
[ 5953.326079] FS: 00007fa12f533140(0000) GS:ffff94d7cec00000(0000) knlGS:0000000000000000
[ 5953.326081] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 5953.326083] CR2: 0000555833a58e0c CR3: 000000010667e000 CR4: 0000000000350ee0
[ 5953.326085] DR0: 00000000019c24b0 DR1: 0000000143833d50 DR2: 0000000000ab07dc
[ 5953.326087] DR3: 0000000143e55ec8 DR6: 00000000ffff0ff0 DR7: 0000000000000600
[ 5953.326088] Call Trace:
[ 5953.326092] <TASK>
[ 5953.326093] ? dcn32_determine_det_override+0x11f/0x350 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.326625] ? __warn+0x81/0x130
[ 5953.326633] ? dcn32_determine_det_override+0x11f/0x350 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.327163] ? report_bug+0x171/0x1a0
[ 5953.327169] ? handle_bug+0x3c/0x80
[ 5953.327172] ? exc_invalid_op+0x17/0x70
[ 5953.327175] ? asm_exc_invalid_op+0x1a/0x20
[ 5953.327181] ? dcn32_determine_det_override+0x11f/0x350 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.327698] ? dcn32_predict_pipe_split+0x187/0x230 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.328269] dcn32_populate_dml_pipes_from_context+0x28e/0x320 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.328806] dcn32_internal_validate_bw+0x125/0x1d70 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.329388] ? __kmem_cache_alloc_node+0x18d/0x310
[ 5953.329394] dcn32_validate_bandwidth+0x213/0x320 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.329923] dc_validate_global_state+0x30a/0x3e0 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.330446] amdgpu_dm_atomic_check+0xf8d/0x1190 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.331018] drm_atomic_check_only+0x5c5/0xa40
[ 5953.331024] drm_mode_atomic_ioctl+0x76e/0xbc0
[ 5953.331030] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10
[ 5953.331034] drm_ioctl_kernel+0xcd/0x170
[ 5953.331040] drm_ioctl+0x26d/0x4b0
[ 5953.331042] ? __pfx_drm_mode_atomic_ioctl+0x10/0x10
[ 5953.331048] amdgpu_drm_ioctl+0x4e/0x90 [amdgpu a854ad59858dd181b7a6a163f3f335794fbeac59]
[ 5953.331510] __x64_sys_ioctl+0x94/0xd0
[ 5953.331514] do_syscall_64+0x60/0x90
[ 5953.331520] ? handle_mm_fault+0x11e/0x310
[ 5953.331525] ? do_user_addr_fault+0x1e0/0x720
[ 5953.331530] ? syscall_exit_to_user_mode+0x1b/0x40
[ 5953.331534] ? exc_page_fault+0x7c/0x180
[ 5953.331536] entry_SYSCALL_64_after_hwframe+0x72/0xdc
[ 5953.331539] RIP: 0033:0x7fa13036d76f
[ 5953.331562] Code: 00 48 89 44 24 18 31 c0 48 8d 44 24 60 c7 04 24 10 00 00 00 48 89 44 24 08 48 8d 44 24 20 48 89 44 24 10 b8 10 00 00 00 0f 05 <89> c2 3d 00 f0 ff ff 77 18 48 8b 44 24 18 64 48 2b 04 25 28 00 00
[ 5953.331564] RSP: 002b:00007ffccb163b90 EFLAGS: 00000246 ORIG_RAX: 0000000000000010
[ 5953.331567] RAX: ffffffffffffffda RBX: 0000555833b96f40 RCX: 00007fa13036d76f
[ 5953.331568] RDX: 00007ffccb163c30 RSI: 00000000c03864bc RDI: 000000000000000b
[ 5953.331570] RBP: 00007ffccb163c30 R08: 0000000000000003 R09: 0000000000000003
[ 5953.331571] R10: 0000555832654010 R11: 0000000000000246 R12: 00000000c03864bc
[ 5953.331573] R13: 000000000000000b R14: 0000555833b57db0 R15: 0000555833b78d50
[ 5953.331576] </TASK>
[ 5953.331577] ---[ end trace 0000000000000000 ]---
Edited by Simon Ser