Kernel warning in psr_su_set_dsc_slice_height and dsc2_disable at boot
First of all, thank you very much for your work on this driver.
Brief summary of the problem:
Everytime at boot, I get two warnings in my kernel's log. I think this might be breaking PSR? I'm not sure, powertop reports some amdgpu interrupts even when showing static content.
Power est. Usage Events/s Category Description
209 mW 5.5 ms/s 63.1 Interrupt [71] amdgpu
[ 9.004995] WARNING: CPU: 0 PID: 9 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_dsc.c:272 dsc2_disable+0x10a/0x190 [amdgpu]
[ 9.005291] Modules linked in: ccm hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_hub cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btintel btbcm btmtk bluetooth ecdh_generic crc16 amdgpu snd_ps_pdm_dma snd_soc_dmic snd_soc_ps_mach snd_sof_amd_acp63 snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine amdxcp snd_hda_codec_conexant drm_exec snd_pci_ps snd_hda_codec_generic gpu_sched snd_rpl_pci_acp6x drm_buddy snd_acp_pci ledtrig_audio i2c_algo_bit snd_acp_legacy_common drm_suballoc_helper snd_pci_acp6x drm_ttm_helper snd_pci_acp5x snd_hda_codec_hdmi ttm snd_rn_pci_acp3x snd_acp_config intel_rapl_msr drm_display_helper snd_soc_acpi vfat snd_hda_intel intel_rapl_common fat cec snd_pci_acp3x snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore amd_sfh joydev
[ 9.005332] mousedev edac_mce_amd kvm_amd ccp kvm mt7921e mt7921_common mt792x_lib irqbypass mt76_connac_lib crct10dif_pclmul crc32_pclmul mt76 polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel mac80211 sha512_ssse3 sha1_ssse3 aesni_intel ucsi_acpi crypto_simd hid_multitouch typec_ucsi cryptd video wmi_bmof libarc4 cfg80211 typec i2c_hid_acpi rfkill amd_pmc wmi roles i2c_hid k10temp i2c_piix4 pcspkr rapl mac_hid crypto_user fuse dm_mod loop lzo_rle zram ip_tables x_tables serio_raw atkbd libps2 rtsx_pci_sdmmc mmc_core vivaldi_fmap nvme xhci_pci sha256_ssse3 i8042 nvme_core rtsx_pci xhci_pci_renesas serio btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq
[ 9.005378] CPU: 0 PID: 9 Comm: kworker/0:1 Not tainted 6.7.0-rc3-273-tkg-eevdf #1 45f8bfe48c99e8beec4a7d4ee4568a345eb87cbb
[ 9.005382] Hardware name: XIAOMI Redmi Book Pro 15 2023/TM2209, BIOS RMAPH5B0P0909 08/04/2023
[ 9.005383] Workqueue: events fbcon_register_existing_fbs
[ 9.005389] RIP: 0010:dsc2_disable+0x10a/0x190 [amdgpu]
[ 9.005559] Code: 4c 24 0c 44 8b 43 10 48 8b 40 10 48 8b 30 48 85 f6 74 04 48 8b 76 08 48 c7 c1 e8 37 e4 c1 ba 08 00 00 00 31 ff e8 d6 29 33 e1 <0f> 0b 48 8b 53 20 48 8b 43 28 48 8b 7b 08 45 31 c9 0f b6 8a b4 00
[ 9.005560] RSP: 0018:ffffc900000e75b8 EFLAGS: 00010246
[ 9.005561] RAX: 0000000000000000 RBX: ffff888100294600 RCX: ffffffffc1e437e8
[ 9.005562] RDX: 0000000000000008 RSI: ffff888101b700c0 RDI: 0000000000000000
[ 9.005562] RBP: 0000000000000001 R08: 0000000000000000 R09: 0000000000000000
[ 9.005563] R10: ffffc900000e74e8 R11: 000000000000ff00 R12: ffff88811c8c0248
[ 9.005563] R13: ffff888100294600 R14: ffff888101c74000 R15: ffff888101c74000
[ 9.005564] FS: 0000000000000000(0000) GS:ffff88842e800000(0000) knlGS:0000000000000000
[ 9.005564] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9.005565] CR2: 0000563359ec6430 CR3: 000000012253c000 CR4: 0000000000f50ef0
[ 9.005566] PKRU: 55555554
[ 9.005566] Call Trace:
[ 9.005570] <TASK>
[ 9.005573] ? __warn+0x81/0x1b0
[ 9.005580] ? dsc2_disable+0x10a/0x190 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.005728] ? report_bug+0x202/0x270
[ 9.005732] ? handle_bug+0x3c/0x80
[ 9.005734] ? exc_invalid_op+0x19/0xc0
[ 9.005735] ? asm_exc_invalid_op+0x1a/0x20
[ 9.005738] ? dsc2_disable+0x10a/0x190 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.005880] ? dsc2_disable+0x10a/0x190 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006017] link_set_dsc_on_stream+0x2ed/0x3e0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006193] ? dm_helpers_dp_write_dsc_enable+0x28a/0x700 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006372] ? disable_link+0xd5/0x200 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006541] link_set_dpms_off+0x1c4/0xaf0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006689] ? dmub_dcn31_get_fw_boot_status+0x20/0x30 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006842] ? dmub_srv_get_fw_boot_status+0x2a/0x50 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.006991] ? dc_dmub_srv_is_restore_required+0x40/0x90 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007140] ? dm_read_reg_func+0x38/0xb0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007314] dc_commit_state_no_check+0x16f2/0x1e30 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007472] dc_commit_streams+0x33a/0x8a0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007619] amdgpu_dm_atomic_commit_tail+0x414/0x3600 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007783] ? dcn314_validate_bandwidth+0x265/0x3b0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.007946] ? dma_resv_get_fences+0xa3/0x2d0
[ 9.007949] ? amdgpu_dm_plane_helper_prepare_fb+0x17f/0x2f0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.008108] ? amdgpu_dm_plane_helper_prepare_fb+0x1c1/0x2f0 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.008248] commit_tail+0x8f/0x130
[ 9.008250] drm_atomic_helper_commit+0x11a/0x140
[ 9.008252] drm_atomic_commit+0x97/0xd0
[ 9.008255] ? __pfx___drm_printfn_info+0x10/0x10
[ 9.008257] drm_client_modeset_commit_atomic.constprop.0+0x1c2/0x200
[ 9.008259] drm_client_modeset_commit_locked+0x55/0x190
[ 9.008260] drm_client_modeset_commit+0x25/0x40
[ 9.008261] drm_fb_helper_set_par+0x94/0xd0
[ 9.008264] fbcon_init+0x33b/0x6d0
[ 9.008266] visual_init+0xc6/0x120
[ 9.008270] do_bind_con_driver.isra.0+0x26f/0x540
[ 9.008272] do_take_over_console+0x235/0x480
[ 9.008274] do_fb_registered+0x10f/0x210
[ 9.008276] fbcon_register_existing_fbs+0x43/0x70
[ 9.008277] process_one_work+0x170/0x330
[ 9.008280] worker_thread+0x3ec/0x570
[ 9.008282] ? __pfx_worker_thread+0x10/0x10
[ 9.008283] kthread+0xe5/0x120
[ 9.008286] ? __pfx_kthread+0x10/0x10
[ 9.008287] ret_from_fork+0x31/0x50
[ 9.008291] ? __pfx_kthread+0x10/0x10
[ 9.008291] ret_from_fork_asm+0x1b/0x30
[ 9.008294] </TASK>
[ 9.008294] ---[ end trace 0000000000000000 ]---
[ 9.041315] amdgpu 0000:04:00.0: [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:264
[ 9.044411] amdgpu 0000:04:00.0: [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:272
[ 9.047472] amdgpu 0000:04:00.0: [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:280
[ 9.050552] amdgpu 0000:04:00.0: [drm] REG_WAIT timeout 1us * 1000 tries - dcn314_dsc_pg_control line:288
[ 9.719360] WARNING: CPU: 0 PID: 9 at drivers/gpu/drm/amd/amdgpu/../display/modules/power/power_helpers.c:966 psr_su_set_dsc_slice_height+0x6f/0x80 [amdgpu]
[ 9.719679] Modules linked in: ccm hid_sensor_als hid_sensor_trigger industrialio_triggered_buffer kfifo_buf hid_sensor_iio_common industrialio hid_sensor_hub cmac algif_hash algif_skcipher af_alg bnep btusb btrtl btintel btbcm btmtk bluetooth ecdh_generic crc16 amdgpu snd_ps_pdm_dma snd_soc_dmic snd_soc_ps_mach snd_sof_amd_acp63 snd_sof_amd_vangogh snd_sof_amd_rembrandt snd_sof_amd_renoir snd_sof_amd_acp snd_sof_pci snd_sof_xtensa_dsp snd_sof snd_sof_utils snd_soc_core snd_compress ac97_bus snd_pcm_dmaengine amdxcp snd_hda_codec_conexant drm_exec snd_pci_ps snd_hda_codec_generic gpu_sched snd_rpl_pci_acp6x drm_buddy snd_acp_pci ledtrig_audio i2c_algo_bit snd_acp_legacy_common drm_suballoc_helper snd_pci_acp6x drm_ttm_helper snd_pci_acp5x snd_hda_codec_hdmi ttm snd_rn_pci_acp3x snd_acp_config intel_rapl_msr drm_display_helper snd_soc_acpi vfat snd_hda_intel intel_rapl_common fat cec snd_pci_acp3x snd_intel_dspcfg snd_intel_sdw_acpi snd_hda_codec snd_hda_core snd_hwdep snd_pcm snd_timer snd soundcore amd_sfh joydev
[ 9.719720] mousedev edac_mce_amd kvm_amd ccp kvm mt7921e mt7921_common mt792x_lib irqbypass mt76_connac_lib crct10dif_pclmul crc32_pclmul mt76 polyval_clmulni polyval_generic gf128mul ghash_clmulni_intel mac80211 sha512_ssse3 sha1_ssse3 aesni_intel ucsi_acpi crypto_simd hid_multitouch typec_ucsi cryptd video wmi_bmof libarc4 cfg80211 typec i2c_hid_acpi rfkill amd_pmc wmi roles i2c_hid k10temp i2c_piix4 pcspkr rapl mac_hid crypto_user fuse dm_mod loop lzo_rle zram ip_tables x_tables serio_raw atkbd libps2 rtsx_pci_sdmmc mmc_core vivaldi_fmap nvme xhci_pci sha256_ssse3 i8042 nvme_core rtsx_pci xhci_pci_renesas serio btrfs blake2b_generic libcrc32c crc32c_generic crc32c_intel xor raid6_pq
[ 9.719766] CPU: 0 PID: 9 Comm: kworker/0:1 Tainted: G W 6.7.0-rc3-273-tkg-eevdf #1 45f8bfe48c99e8beec4a7d4ee4568a345eb87cbb
[ 9.719770] Hardware name: XIAOMI Redmi Book Pro 15 2023/TM2209, BIOS RMAPH5B0P0909 08/04/2023
[ 9.719772] Workqueue: events fbcon_register_existing_fbs
[ 9.719778] RIP: 0010:psr_su_set_dsc_slice_height+0x6f/0x80 [amdgpu]
[ 9.719934] Code: 78 66 03 72 7c 31 d2 0f b7 f6 89 f0 41 f7 f0 66 89 41 1a 44 39 c6 72 16 0f b6 51 13 84 d2 74 0e 0f b6 ca 99 f7 f9 85 d2 74 04 <0f> 0b eb 05 bf 01 00 00 00 89 f8 c3 cc cc cc cc 90 90 90 90 90 90
[ 9.719935] RSP: 0018:ffffc900000e78a0 EFLAGS: 00010202
[ 9.719936] RAX: 000000000000001f RBX: ffff888101c74000 RCX: 0000000000000004
[ 9.719937] RDX: 0000000000000001 RSI: 00000000000007d0 RDI: 0000000000000000
[ 9.719938] RBP: ffffc900000e78c4 R08: 0000000000000010 R09: 0000000000000004
[ 9.719938] R10: 000000000000018c R11: 0000000000000008 R12: ffff888115ca4000
[ 9.719939] R13: ffff88811d200000 R14: ffff88810e8d0b80 R15: ffff888103ca4000
[ 9.719940] FS: 0000000000000000(0000) GS:ffff88842e800000(0000) knlGS:0000000000000000
[ 9.719940] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 9.719941] CR2: 0000563359ec6430 CR3: 00000003c4a20000 CR4: 0000000000f50ef0
[ 9.719941] PKRU: 55555554
[ 9.719942] Call Trace:
[ 9.719944] <TASK>
[ 9.719946] ? __warn+0x81/0x1b0
[ 9.719953] ? psr_su_set_dsc_slice_height+0x6f/0x80 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.720103] ? report_bug+0x202/0x270
[ 9.720107] ? handle_bug+0x3c/0x80
[ 9.720109] ? exc_invalid_op+0x19/0xc0
[ 9.720110] ? asm_exc_invalid_op+0x1a/0x20
[ 9.720113] ? psr_su_set_dsc_slice_height+0x6f/0x80 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.720258] amdgpu_dm_link_setup_psr+0xd0/0x150 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.720458] amdgpu_dm_atomic_commit_tail+0x22c5/0x3600 [amdgpu 467dd2c3a70a1e5c1220173de04408f97bebda55]
[ 9.720655] commit_tail+0x8f/0x130
[ 9.720658] drm_atomic_helper_commit+0x11a/0x140
[ 9.720660] drm_atomic_commit+0x97/0xd0
[ 9.720663] ? __pfx___drm_printfn_info+0x10/0x10
[ 9.720666] drm_client_modeset_commit_atomic.constprop.0+0x1c2/0x200
[ 9.720668] drm_client_modeset_commit_locked+0x55/0x190
[ 9.720669] drm_client_modeset_commit+0x25/0x40
[ 9.720670] drm_fb_helper_set_par+0x94/0xd0
[ 9.720672] fbcon_init+0x33b/0x6d0
[ 9.720674] visual_init+0xc6/0x120
[ 9.720677] do_bind_con_driver.isra.0+0x26f/0x540
[ 9.720679] do_take_over_console+0x235/0x480
[ 9.720680] do_fb_registered+0x10f/0x210
[ 9.720681] fbcon_register_existing_fbs+0x43/0x70
[ 9.720683] process_one_work+0x170/0x330
[ 9.720685] worker_thread+0x3ec/0x570
[ 9.720686] ? __pfx_worker_thread+0x10/0x10
[ 9.720687] kthread+0xe5/0x120
[ 9.720689] ? __pfx_kthread+0x10/0x10
[ 9.720690] ret_from_fork+0x31/0x50
[ 9.720692] ? __pfx_kthread+0x10/0x10
[ 9.720693] ret_from_fork_asm+0x1b/0x30
[ 9.720695] </TASK>
[ 9.720695] ---[ end trace 0000000000000000 ]---
I linked the whole log to this ticket. Those two log entries don't necesarilly look related to me, so please tell me if I should split this bug report in two.
Hardware description:
- Computer: Xiaomi RedmiBook Pro 15 2023
- CPU: 7840HS
- GPU:
04:00.0 VGA compatible controller [0300]: Advanced Micro Devices, Inc. [AMD/ATI] Phoenix1 [1002:15bf] (rev c7)
(780M) - System Memory: 16GB
- Display(s): Thermotrex Corporation TL156MDMP31-0
- Type of Display Connection: eDP-1
System information:
- Distro name and Version: ArchLinux
- Kernel version: 6.7.0-rc3-273, but I confirmed I get the same issue in Arch's default 6.6 kernel.
- Custom kernel: Yes, but doesn't seem related.
- Compositor: Hyprland. 3200x2000@60.00000, scale: 1.50, transform: 0, focused: yes, dpmsStatus: 1, vrr: 1, activelyTearing: false
The kernel stack traces print before opening a user session and starting the compositor. I get them even if I boot straight to a vconsole.
❯ sudo python ./psr.py
DRI device 0 DMCUB F/W version: 0x08002a00
○ PSR 1 [1]
○ Sink OUI: 38-ec-11
○ resv_40f: 00
○ ID String: 00-00
○ PSR Status: 00-00-00
# cat /sys/kernel/debug/dri/0/eDP-1/psr_capability
Sink support: yes [0x01]
Driver support: no
# cat /sys/kernel/debug/dri/0/eDP-1/psr_residency
0
# cat /sys/kernel/debug/dri/0/eDP-1/psr_state
0
How to reproduce the issue:
Boot and look at dmesg. Observe powertop.