AMDGPU and Display Stream Compression, non-working monitor

I have a fairly new monitor that requires Display Stream Compression (DSC) support to run at a high refresh rate with a high resolution.
To achieve such refresh rate, the GPU needs to support DSC.

The AMDGPU driver supposedly has support for DSC.

DSC initialization fails on my system and I cannot use the monitor unless I lower the refresh rate down to 60hz at ~4k.

I know my GPU supports DSC and this monitor as it works on Windows™ /shrug

I wonder whether the options enabled by this PR would resolve the issue?
https://github.com/NixOS/nixpkgs/pull/107400

System info

  • GPU: AMD RX5700XT
  • Kernel: 5.10.1-zen1
  • nixpkgs: github:nixos/nixpkgs/ac02f26980ffc6a84844943cb2c303662225543a
  • nixos-version: 21.03.20201230.ac02f26

Relevant lines from dmesg:

[   11.251965] amdgpu: ATOM BIOS: 111
[   11.251971] [drm] VCN decode is enabled in VM mode
[   11.251972] [drm] VCN encode is enabled in VM mode
[   11.251972] [drm] JPEG decode is enabled in VM mode
[   11.251986] [drm] vm size is 262144 GB, 4 levels, block size is 9-bit, fragment size is 9-bit
[   11.251990] amdgpu 0000:0b:00.0: amdgpu: VRAM: 8176M 0x0000008000000000 - 0x00000081FEFFFFFF (8176M used)
[   11.251991] amdgpu 0000:0b:00.0: amdgpu: GART: 512M 0x0000000000000000 - 0x000000001FFFFFFF
[   11.251997] [drm] Detected VRAM RAM=8176M, BAR=256M
[   11.251998] [drm] RAM width 256bits GDDR6
[   11.252029] [TTM] Zone  kernel: Available graphics memory: 8171134 KiB
[   11.252029] [TTM] Zone   dma32: Available graphics memory: 2097152 KiB
[   11.252030] [TTM] Initializing pool allocator
[   11.252031] [TTM] Initializing DMA pool allocator
[   11.252052] [drm] amdgpu: 8176M of VRAM memory ready
[   11.252053] [drm] amdgpu: 8176M of GTT memory ready.
[   11.252054] [drm] GART: num cpu pages 131072, num gpu pages 131072
[   11.252187] [drm] PCIE GART of 512M enabled (table at 0x0000008000300000).
[   11.260788] [drm] Found VCN firmware Version ENC: 1.10 DEC: 5 VEP: 0 Revision: 13
[   11.260792] [drm] PSP loading VCN firmware
<snip>
[   11.996896] amdgpu 0000:0b:00.0: amdgpu: RAS: optional ras ta ucode is not available
[   12.003896] amdgpu 0000:0b:00.0: amdgpu: RAP: optional rap ta ucode is not available
[   12.003919] amdgpu 0000:0b:00.0: amdgpu: smu driver if version = 0x00000036, smu fw if version = 0x00000037, smu fw version = 0x002a3d00 (42.61.0)
[   12.003919] amdgpu 0000:0b:00.0: amdgpu: SMU driver if version not matched
[   12.003966] amdgpu 0000:0b:00.0: amdgpu: use vbios provided pptable
[   12.003968] amdgpu 0000:0b:00.0: amdgpu: smc_dpm_info table revision(format.content): 4.5
[   12.039164] amdgpu 0000:0b:00.0: amdgpu: SMU is initialized successfully!
[   12.039357] [drm] Display Core initialized with v3.2.104!
<snip>
[   12.809913] ------------[ cut here ]------------
[   12.809917] WARNING: CPU: 13 PID: 1056 at arch/x86/kernel/fpu/core.c:129 kernel_fpu_begin+0xb9/0xd0
[   12.809917] Modules linked in: pcc_cpufreq(-) fjes(-) fuse xt_pkttype nf_log_ipv6 nf_log_ipv4 nf_log_common xt_LOG xt_tcpudp amdgpu(+) ip6table_filter ip6_tables iwlmvm iptable_filter sch_fq_codel
hid_xpadneo(OE) snd_hda_codec_realtek iommu_v2 ff_memless gpu_sched ttm snd_hda_codec_generic snd_pcm_oss mac80211 ledtrig_audio snd_hda_codec_hdmi drm_kms_helper snd_mixer_oss atkbd snd_hda_intel lib
ps2 snd_intel_dspcfg serio btusb wmi_bmof drm snd_usb_audio snd_hda_codec igb libarc4 btrtl btbcm snd_usbmidi_lib btintel snd_hda_core snd_rawmidi snd_hwdep snd_seq_device bluetooth ptp iwlwifi edac_m
ce_amd snd_pcm deflate agpgart edac_core cdc_ether nls_iso8859_1 fb_sys_fops usbnet syscopyarea sp5100_tco snd_timer nls_cp437 crc32_pclmul ghash_clmulni_intel ftdi_sio r8152 snd pps_core efi_pstore w
atchdog vfat sysfillrect joydev evdev mousedev sysimgblt ecdh_generic dca fat mii cfg80211 usbserial mac_hid rapl backlight ecc pstore k10temp i2c_piix4 i2c_algo_bit soundcore loop rfkill tap macvlan
veth
[   12.809947]  bridge wmi thermal(+) stp tiny_power_button llc tun pinctrl_amd button kvm_amd acpi_cpufreq kvm irqbypass v4l2loopback(OE) videodev mc i2c_core uinput efivarfs ip_tables x_tables autof
s4 ext4 crc32c_generic crc16 mbcache jbd2 dm_crypt cbc sha256_ssse3 sha256_generic encrypted_keys trusted tpm rng_core input_leds led_class sd_mod hid_generic usbhid hid xhci_pci ahci xhci_pci_renesas
 crc32c_intel libahci xhci_hcd libata aesni_intel libaes crypto_simd cryptd glue_helper usbcore nvme scsi_mod nvme_core t10_pi crc_t10dif crct10dif_generic crct10dif_pclmul usb_common crct10dif_common
 rtc_cmos dm_mod
[   12.809967] CPU: 13 PID: 1056 Comm: systemd-udevd Tainted: G           OE     5.10.1-zen1 #1-NixOS
[   12.809968] Hardware name: Gigabyte Technology Co., Ltd. X570 I AORUS PRO WIFI/X570 I AORUS PRO WIFI, BIOS F20 07/07/2020
[   12.809969] RIP: 0010:kernel_fpu_begin+0xb9/0xd0
[   12.809971] Code: 00 75 2b 48 83 c4 10 c3 65 8a 05 8a 29 7e 50 84 c0 74 9b 0f 0b eb 97 f0 80 4f 01 40 48 81 c7 00 0b 00 00 e8 39 fe ff ff eb ae <0f> 0b eb 8b e8 de a5 77 00 66 66 2e 0f 1f 84 00 00
00 00 00 0f 1f
[   12.809971] RSP: 0018:ffffb5dac0dd6fd8 EFLAGS: 00010202
[   12.809972] RAX: 0000000080000001 RBX: 0000000000000080 RCX: 0000000000000000
[   12.809973] RDX: 0000000000000080 RSI: ffffb5dac0dd71d8 RDI: ffff8e60c3903230
[   12.809974] RBP: 0000000000000780 R08: 000000000000000a R09: ffffb5dac0dd72c0
[   12.809974] R10: 0000000000000438 R11: 0000000000000000 R12: 0000000000000000
[   12.809976] R13: ffff8e60c3903238 R14: ffffb5dac0dd71d8 R15: 0000000000000001
[   12.809977] FS:  00007f8184394f80(0000) GS:ffff8e63eed40000(0000) knlGS:0000000000000000
[   12.809977] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   12.809978] CR2: 0000000002206758 CR3: 000000010eae8000 CR4: 0000000000350ee0
[   12.809978] Call Trace:
[   12.810065]  calc_dsc_bytes_per_pixel+0x1e/0xf0 [amdgpu]
[   12.810138]  dscc_compute_dsc_parameters+0x2c/0x3a0 [amdgpu]
[   12.810209]  ? dml20v2_ModeSupportAndSystemConfigurationFull+0x4a51/0x5f70 [amdgpu]
[   12.810267]  ? CalculateFlipSchedule.part.0+0x408/0x490 [amdgpu]
[   12.810321]  ? dml20v2_ModeSupportAndSystemConfigurationFull+0x52a1/0x5f70 [amdgpu]
[   12.810373]  ? dml20v2_ModeSupportAndSystemConfigurationFull+0x57a5/0x5f70 [amdgpu]
[   12.810428]  dsc_prepare_config+0x387/0x4e0 [amdgpu]
[   12.810482]  ? adjust_vp_and_init_for_seamless_clip+0x136/0x2f0 [amdgpu]
[   12.810537]  dsc2_validate_stream+0x37/0x60 [amdgpu]
[   12.810593]  dcn20_validate_dsc+0x140/0x170 [amdgpu]
[   12.810649]  dcn20_fast_validate_bw+0x632/0x6c0 [amdgpu
[   12.810704]  ? dcn20_validate_bandwidth_internal+0x77/0x990 [amdgpu]
[   12.810757]  dcn20_validate_bandwidth_internal+0xa8/0x990 [amdgpu]
[   12.810811]  dcn20_validate_bandwidth_fp+0x57/0xe0 [amdgpu]
[   12.810864]  dcn20_validate_bandwidth+0x24/0x40 [amdgpu]
[   12.810917]  dc_validate_global_state+0x28a/0x310 [amdgpu]
[   12.810976]  amdgpu_dm_atomic_check+0xab0/0xbd0 [amdgpu]
[   12.810983]  drm_atomic_check_only+0x566/0x7e0 [drm]
[   12.810988]  drm_atomic_commit+0x13/0x50 [drm]
[   12.810992]  drm_client_modeset_commit_atomic+0x1e4/0x220 [drm]
[   12.810996]  drm_client_modeset_commit_locked+0x52/0x150 [drm]
[   12.811000]  drm_client_modeset_commit+0x24/0x40 [drm]
[   12.811002]  __drm_fb_helper_restore_fbdev_mode_unlocked+0x94/0xc0 [drm_kms_helper]
[   12.811004]  drm_fb_helper_set_par+0x3c/0x50 [drm_kms_helper]
[   12.811007]  fbcon_init+0x2b1/0x590
[   12.811009]  visual_init+0xce/0x130
[   12.811010]  do_bind_con_driver+0x1ba/0x2a0
[   12.811011]  do_take_over_console+0x115/0x180
[   12.811012]  do_fbcon_takeover+0x58/0xb0
[   12.811014]  register_framebuffer+0x1e4/0x300
[   12.811016]  __drm_fb_helper_initial_config_and_unlock+0x33a/0x4a0 [drm_kms_helper]
[   12.811058]  amdgpu_fbdev_init+0xb9/0xf0 [amdgpu]
[   12.811117]  amdgpu_device_init.cold+0x1251/0x16a6 [amdgpu]
[   12.811120]  ? acpi_pci_irq_enable+0x10d/0x1e0
[   12.811122]  ? pci_conf1_read+0xa4/0x100
[   12.811123]  ? pci_bus_read_config_word+0x49/0x70
[   12.811163]  amdgpu_driver_load_kms+0x2b/0x1f0 [amdgpu]
[   12.811204]  amdgpu_pci_probe+0x114/0x1a0 [amdgpu]
[   12.811206]  local_pci_probe+0x42/0x80
[   12.811207]  pci_device_probe+0x104/0x1b0
[   12.811209]  really_probe+0x1ca/0x420
[   12.811210]  driver_probe_device+0xe1/0x150
[   12.811211]  device_driver_attach+0x53/0x60
[   12.811212]  __driver_attach+0x8a/0x150
[   12.811213]  ? device_driver_attach+0x60/0x60
[   12.811213]  ? device_driver_attach+0x60/0x60
[   12.811214]  bus_for_each_dev+0x78/0xc0
[   12.811215]  bus_add_driver+0x14d/0x1f0
[   12.811217]  ? 0xffffffffc1a1c000
[   12.811218]  driver_register+0x6c/0xc0
[   12.811218]  ? 0xffffffffc1a1c000
[   12.811219]  do_one_initcall+0xc4/0x260
[   12.811222]  ? _cond_resched+0x15/0x30
[   12.811223]  ? unmap_kernel_range_noflush+0x38b/0x420
[   12.811224]  ? free_vmap_area_noflush+0x99/0xf0
[   12.811226]  ? __vunmap+0x1b5/0x210
[   12.811227]  ? _cond_resched+0x15/0x30
[   12.811228]  ? kmem_cache_alloc_trace+0x44/0x400
[   12.811229]  do_init_module+0x5c/0x220
[   12.811230]  load_module+0x2607/0x2990
[   12.811231]  ? map_kernel_range_noflush+0x30c/0x470
[   12.811233]  ? __x64_sys_init_module+0x83/0xe0
[   12.811235]  __x64_sys_init_module+0x83/0xe0
[   12.811237]  do_syscall_64+0x33/0x40
[   12.811238]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   12.811239] RIP: 0033:0x7f81847b405a
[   12.811240] Code: 48 8b 0d 19 1e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e6 1d 0c 00 f7 d8 64 89 01 48
[   12.811240] RSP: 002b:00007ffc28a2f238 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   12.811241] RAX: ffffffffffffffda RBX: 000055d888e0af90 RCX: 00007f81847b405a
[   12.811241] RDX: 000055d888e1d310 RSI: 0000000000a1b3f9 RDI: 00007f81823cb010
[   12.811242] RBP: 00007f81823cb010 R08: 000055d888d4701a R09: 0000000000000000
[   12.811242] R10: 000055d888d47010 R11: 0000000000000246 R12: 000055d888e1d310
[   12.811243] R13: 0000000000000000 R14: 000055d888d49090 R15: 000055d888e0af90
[   12.811244] ---[ end trace 411fa8db72cbe9c9 ]---
[   12.811838] ------------[ cut here ]------------
[   12.811840] WARNING: CPU: 13 PID: 1056 at arch/x86/kernel/fpu/core.c:154 kernel_fpu_end+0x19/0x20
[   12.811841] Modules linked in: pcc_cpufreq(-) fjes(-) fuse xt_pkttype nf_log_ipv6 nf_log_ipv4 nf_log_common xt_LOG xt_tcpudp amdgpu(+) ip6table_filter ip6_tables iwlmvm iptable_filter sch_fq_codel
hid_xpadneo(OE) snd_hda_codec_realtek iommu_v2 ff_memless gpu_sched ttm snd_hda_codec_generic snd_pcm_oss mac80211 ledtrig_audio snd_hda_codec_hdmi drm_kms_helper snd_mixer_oss atkbd snd_hda_intel lib
ps2 snd_intel_dspcfg serio btusb wmi_bmof drm snd_usb_audio snd_hda_codec igb libarc4 btrtl btbcm snd_usbmidi_lib btintel snd_hda_core snd_rawmidi snd_hwdep snd_seq_device bluetooth ptp iwlwifi edac_m
ce_amd snd_pcm deflate agpgart edac_core cdc_ether nls_iso8859_1 fb_sys_fops usbnet syscopyarea sp5100_tco snd_timer nls_cp437 crc32_pclmul ghash_clmulni_intel ftdi_sio r8152 snd pps_core efi_pstore w
atchdog vfat sysfillrect joydev evdev mousedev sysimgblt ecdh_generic dca fat mii cfg80211 usbserial mac_hid rapl backlight ecc pstore k10temp i2c_piix4 i2c_algo_bit soundcore loop rfkill tap macvlan
veth
[   12.811858]  bridge wmi thermal(+) stp tiny_power_button llc tun pinctrl_amd button kvm_amd acpi_cpufreq kvm irqbypass v4l2loopback(OE) videodev mc i2c_core uinput efivarfs ip_tables x_tables autof
s4 ext4 crc32c_generic crc16 mbcache jbd2 dm_crypt cbc sha256_ssse3 sha256_generic encrypted_keys trusted tpm rng_core input_leds led_class sd_mod hid_generic usbhid hid xhci_pci ahci xhci_pci_renesas
 crc32c_intel libahci xhci_hcd libata aesni_intel libaes crypto_simd cryptd glue_helper usbcore nvme scsi_mod nvme_core t10_pi crc_t10dif crct10dif_generic crct10dif_pclmul usb_common crct10dif_common
 rtc_cmos dm_mod
[   12.811871] CPU: 13 PID: 1056 Comm: systemd-udevd Tainted: G        W  OE     5.10.1-zen1 #1-NixOS
[   12.811872] Hardware name: Gigabyte Technology Co., Ltd. X570 I AORUS PRO WIFI/X570 I AORUS PRO WIFI, BIOS F20 07/07/2020
[   12.811873] RIP: 0010:kernel_fpu_end+0x19/0x20
[   12.811874] Code: ae 47 40 b8 01 00 00 00 c3 0f 0b eb d7 0f 0b eb c9 0f 1f 44 00 00 65 8a 05 cc 2a 7e 50 84 c0 74 09 65 c6 05 c0 2a 7e 50 00 c3 <0f> 0b eb f3 0f 1f 00 0f 1f 44 00 00 8b 15 45 fb 69
01 31 f6 e8 4e
[   12.811874] RSP: 0018:ffffb5dac0dd7468 EFLAGS: 00010246
[   12.811875] RAX: 0000000000000000 RBX: 0000000000000000 RCX: 00000000000007b2
[   12.811875] RDX: 0000000000000001 RSI: ffff8e60d35057c0 RDI: 000000000002ec40
[   12.811875] RBP: ffff8e60e0120000 R08: 0000000000000004 R09: 0000000000000000
[   12.811876] R10: ffffb5dac0dd73b0 R11: 0000000000000401 R12: 0000000000000001
[   12.811876] R13: 0000000000000006 R14: ffff8e60e0121ec8 R15: ffff8e60d921e000
[   12.811877] FS:  00007f8184394f80(0000) GS:ffff8e63eed40000(0000) knlGS:0000000000000000
[   12.811877] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   12.811878] CR2: 0000000002206758 CR3: 000000010eae8000 CR4: 0000000000350ee0
[   12.811878] Call Trace:
[   12.811936]  dcn20_validate_bandwidth+0x2c/0x40 [amdgpu]
[   12.811995]  dc_validate_global_state+0x28a/0x310 [amdgpu]
[   12.812051]  amdgpu_dm_atomic_check+0xab0/0xbd0 [amdgpu]
[   12.812057]  drm_atomic_check_only+0x566/0x7e0 [drm]
[   12.812061]  drm_atomic_commit+0x13/0x50 [drm]
[   12.812065]  drm_client_modeset_commit_atomic+0x1e4/0x220 [drm]
[   12.812069]  drm_client_modeset_commit_locked+0x52/0x150 [drm]
[   12.812073]  drm_client_modeset_commit+0x24/0x40 [drm]
[   12.812075]  __drm_fb_helper_restore_fbdev_mode_unlocked+0x94/0xc0 [drm_kms_helper]
[   12.812077]  drm_fb_helper_set_par+0x3c/0x50 [drm_kms_helper]
[   12.812078]  fbcon_init+0x2b1/0x590
[   12.812079]  visual_init+0xce/0x130
[   12.812080]  do_bind_con_driver+0x1ba/0x2a0
[   12.812082]  do_take_over_console+0x115/0x180
[   12.812083]  do_fbcon_takeover+0x58/0xb0
[   12.812084]  register_framebuffer+0x1e4/0x300
[   12.812086]  __drm_fb_helper_initial_config_and_unlock+0x33a/0x4a0 [drm_kms_helper]
[   12.812127]  amdgpu_fbdev_init+0xb9/0xf0 [amdgpu]
[   12.812185]  amdgpu_device_init.cold+0x1251/0x16a6 [amdgpu]
[   12.812187]  ? acpi_pci_irq_enable+0x10d/0x1e0
[   12.812188]  ? pci_conf1_read+0xa4/0x100
[   12.812189]  ? pci_bus_read_config_word+0x49/0x70
[   12.812229]  amdgpu_driver_load_kms+0x2b/0x1f0 [amdgpu]
[   12.812269]  amdgpu_pci_probe+0x114/0x1a0 [amdgpu]
[   12.812271]  local_pci_probe+0x42/0x80
[   12.812272]  pci_device_probe+0x104/0x1b0
[   12.812273]  really_probe+0x1ca/0x420
[   12.812274]  driver_probe_device+0xe1/0x150
[   12.812274]  device_driver_attach+0x53/0x60
[   12.812275]  __driver_attach+0x8a/0x150
[   12.812276]  ? device_driver_attach+0x60/0x60
[   12.812276]  ? device_driver_attach+0x60/0x60
[   12.812277]  bus_for_each_dev+0x78/0xc0
[   12.812278]  bus_add_driver+0x14d/0x1f0
[   12.812278]  ? 0xffffffffc1a1c000
[   12.812280]  driver_register+0x6c/0xc0
[   12.812281]  ? 0xffffffffc1a1c000
[   12.812282]  do_one_initcall+0xc4/0x260
[   12.812283]  ? _cond_resched+0x15/0x30
[   12.812284]  ? unmap_kernel_range_noflush+0x38b/0x420
[   12.812284]  ? free_vmap_area_noflush+0x99/0xf0
[   12.812285]  ? __vunmap+0x1b5/0x210
[   12.812286]  ? _cond_resched+0x15/0x30
[   12.812286]  ? kmem_cache_alloc_trace+0x44/0x400
[   12.812287]  do_init_module+0x5c/0x220
[   12.812288]  load_module+0x2607/0x2990
[   12.812290]  ? map_kernel_range_noflush+0x30c/0x470
[   12.812292]  ? __x64_sys_init_module+0x83/0xe0
[   12.812292]  __x64_sys_init_module+0x83/0xe0
[   12.812294]  do_syscall_64+0x33/0x40
[   12.812295]  entry_SYSCALL_64_after_hwframe+0x44/0xa9
[   12.812295] RIP: 0033:0x7f81847b405a
[   12.812296] Code: 48 8b 0d 19 1e 0c 00 f7 d8 64 89 01 48 83 c8 ff c3 66 2e 0f 1f 84 00 00 00 00 00 0f 1f 44 00 00 49 89 ca b8 af 00 00 00 0f 05 <48> 3d 01 f0 ff ff 73 01 c3 48 8b 0d e6 1d 0c 00 f7 d8 64 89 01 48
[   12.812297] RSP: 002b:00007ffc28a2f238 EFLAGS: 00000246 ORIG_RAX: 00000000000000af
[   12.812297] RAX: ffffffffffffffda RBX: 000055d888e0af90 RCX: 00007f81847b405a
[   12.812298] RDX: 000055d888e1d310 RSI: 0000000000a1b3f9 RDI: 00007f81823cb010
[   12.812298] RBP: 00007f81823cb010 R08: 000055d888d4701a R09: 0000000000000000
[   12.812298] R10: 000055d888d47010 R11: 0000000000000246 R12: 000055d888e1d310
[   12.812299] R13: 0000000000000000 R14: 000055d888d49090 R15: 000055d888e0af90
[   12.812300] ---[ end trace 411fa8db72cbe9ca ]---
<snip>
[   13.012772] [drm] Initialized amdgpu 3.40.0 20150101 for 0000:0b:00.0 on minor 0
<snip>
[   20.742791] [drm] perform_link_training_with_retries: Link training attempt 1 of 4 failed
[   20.868560] [drm] perform_link_training_with_retries: Link training attempt 2 of 4 failed
[   21.043908] [drm] perform_link_training_with_retries: Link training attempt 3 of 4 failed
[   21.276970] [drm] enabling link 0 failed: 15
[   22.207568] ------------[ cut here ]------------
[   22.207605] WARNING: CPU: 1 PID: 2986 at drivers/gpu/drm/amd/amdgpu/../display/dc/dcn20/dcn20_resource.c:3240 dcn20_validate_bandwidth_fp+0x90/0xe0 [amdgpu]
[   22.207606] Modules linked in: nf_conntrack_netlink nfnetlink xfrm_user xfrm_algo xt_addrtype br_netfilter overlay af_packet xt_CHECKSUM xt_MASQUERADE ipt_REJECT nf_reject_ipv4 ip6table_mangle iptable_mangle ebtable_filter ebtables wireguard curve25519_x86_64 libchacha20poly1305 chacha_x86_64 poly1305_x86_64 libblake2s blake2s_x86_64 ip6_udp_tunnel udp_tunnel libcurve25519_generic libchacha libblake2s_generic ip6table_nat iptable_nat nf_nat cmac algif_hash algif_skcipher af_alg bnep xt_conntrack nf_conntrack nf_defrag_ipv6 nf_defrag_ipv4 libcrc32c ip6t_rpfilter ipt_rpfilter ip6table_raw iptable_raw fuse xt_pkttype nf_log_ipv6 nf_log_ipv4 nf_log_common xt_LOG xt_tcpudp amdgpu ip6table_filter ip6_tables iwlmvm iptable_filter sch_fq_codel hid_xpadneo(OE) snd_hda_codec_realtek iommu_v2 ff_memless gpu_sched ttm snd_hda_codec_generic snd_pcm_oss mac80211 ledtrig_audio snd_hda_codec_hdmi drm_kms_helper snd_mixer_oss atkbd snd_hda_intel libps2 snd_intel_dspcfg serio btusb wmi_bmof drm
[   22.207630]  snd_usb_audio snd_hda_codec igb libarc4 btrtl btbcm snd_usbmidi_lib btintel snd_hda_core snd_rawmidi snd_hwdep snd_seq_device bluetooth ptp iwlwifi edac_mce_amd snd_pcm deflate agpgart edac_core cdc_ether nls_iso8859_1 fb_sys_fops usbnet syscopyarea sp5100_tco snd_timer nls_cp437 crc32_pclmul ghash_clmulni_intel ftdi_sio r8152 snd pps_core efi_pstore watchdog vfat sysfillrect joydev evdev mousedev sysimgblt ecdh_generic dca fat mii cfg80211 usbserial mac_hid rapl backlight ecc pstore k10temp i2c_piix4 i2c_algo_bit soundcore loop rfkill tap macvlan veth bridge wmi thermal stp tiny_power_button llc tun pinctrl_amd button kvm_amd acpi_cpufreq kvm irqbypass v4l2loopback(OE) videodev mc i2c_core uinput efivarfs ip_tables x_tables autofs4 ext4 crc32c_generic crc16 mbcache jbd2 dm_crypt cbc sha256_ssse3 sha256_generic encrypted_keys trusted tpm rng_core input_leds led_class sd_mod hid_generic usbhid hid xhci_pci ahci xhci_pci_renesas crc32c_intel libahci xhci_hcd libata aesni_intel
[   22.207665]  libaes crypto_simd cryptd glue_helper usbcore nvme scsi_mod nvme_core t10_pi crc_t10dif crct10dif_generic crct10dif_pclmul usb_common crct10dif_common rtc_cmos dm_mod
[   22.207671] CPU: 1 PID: 2986 Comm: kworker/1:5 Tainted: G        W  OE     5.10.1-zen1 #1-NixOS
[   22.207672] Hardware name: Gigabyte Technology Co., Ltd. X570 I AORUS PRO WIFI/X570 I AORUS PRO WIFI, BIOS F20 07/07/2020
[   22.207679] Workqueue: events drm_mode_rmfb_work_fn [drm]
[   22.207706] RIP: 0010:dcn20_validate_bandwidth_fp+0x90/0xe0 [amdgpu]
[   22.207707] Code: 00 7b 2b 22 85 0c 1f 00 00 75 25 31 d2 f2 0f 11 85 50 26 00 00 48 89 ee 4c 89 e7 e8 ea f5 ff ff 89 c2 22 95 0c 1f 00 00 75 32 <0f> 0b eb 02 75 d3 f2 0f 10 14 24 f2 0f 11 95 50 26 00 00 48 83 c4
[   22.207708] RSP: 0018:ffffb5dac48cfc40 EFLAGS: 00010246
[   22.207709] RAX: 0000000000000001 RBX: 0000000000000000 RCX: 0000000000004521
[   22.207709] RDX: 0000000000000000 RSI: ffff8e610cc0b980 RDI: 000000000002ec40
[   22.207710] RBP: ffff8e61286c0000 R08: 0000000000000006 R09: 0000000000000000
[   22.207710] R10: ffff8e60ddc20000 R11: 0000000100000001 R12: ffff8e60ddc20000
[   22.207711] R13: ffff8e60d4025dc0 R14: 0000000000000000 R15: ffff8e60d921e000
[   22.207711] FS:  0000000000000000(0000) GS:ffff8e63eea40000(0000) knlGS:0000000000000000
[   22.207712] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[   22.207712] CR2: 00000000013fed48 CR3: 00000001456de000 CR4: 0000000000350ee0
[   22.207713] Call Trace:
[   22.207741]  dcn20_validate_bandwidth+0x24/0x40 [amdgpu]
[   22.207763]  dc_validate_global_state+0x28a/0x310 [amdgpu]
[   22.207769]  ? drm_modeset_lock+0x31/0xb0 [drm]
[   22.207796]  amdgpu_dm_atomic_check+0xab0/0xbd0 [amdgpu]
[   22.207802]  drm_atomic_check_only+0x566/0x7e0 [drm]
[   22.207806]  drm_atomic_commit+0x13/0x50 [drm]
[   22.207810]  drm_framebuffer_remove+0x3a6/0x420 [drm]
[   22.207814]  drm_mode_rmfb_work_fn+0x3c/0x50 [drm]
[   22.207816]  process_one_work+0x1df/0x370
[   22.207818]  worker_thread+0x4d/0x3e0
[   22.207819]  ? process_one_work+0x370/0x370
[   22.207820]  kthread+0xfe/0x140
[   22.207820]  ? kthread_park+0x90/0x90
[   22.207822]  ret_from_fork+0x22/0x30
[   22.207823] ---[ end trace 411fa8db72cbe9cb ]---

EDIT (2022-02-11): This issue was resolved more than 10 months ago.

Tracking ticket:

The issue seems to be a regression in the driver.
I reverted to kernel 5.8.18 and the display works at 240Hz.

I’ll close this when the bug is closed upstream.