Cursor plane: DC global validation failure: Scaling failure (14)
Brief summary of the problem:
I'm using a cursor plane to display a 256x256 buffer.
The primary plane is not scaled:
├───Plane 3
│ └───Properties
│ ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Primary
│ ├───"FB_ID" (atomic): object framebuffer = 104
│ │ ├───Object ID: 104
│ │ ├───Size: 1920x1080
│ │ ├───Format: XRGB8888 (0x34325258)
│ │ ├───Modifier: AMD(TILE_VERSION = GFX9, TILE = GFX9_64K_S_X, PIPE_XOR_BITS = 4, BANK_XOR_BITS = 0) (0x200000000401901)
│ │ └───Planes:
│ │ └───Plane 0: offset = 0, pitch = 7680
│ ├───"CRTC_ID" (atomic): object CRTC = 71
│ ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 0
│ ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 0
│ ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 1920
│ ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 1080
│ ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
│ ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
│ ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 1920
│ ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 1080
The cursor plane is not scaled:
├───Plane 5
│ └───Properties
│ ├───"type" (immutable): enum {Overlay, Primary, Cursor} = Cursor
│ ├───"FB_ID" (atomic): object framebuffer = 106
│ │ ├───Object ID: 106
│ │ ├───Size: 256x256
│ │ ├───Format: ARGB8888 (0x34325241)
│ │ ├───Modifier: AMD(TILE_VERSION = GFX9, TILE = GFX9_64K_S_X, PIPE_XOR_BITS = 4, BANK_XOR_BITS = 0) (0x200000000401901)
│ │ └───Planes:
│ │ └───Plane 0: offset = 0, pitch = 1024
│ ├───"CRTC_ID" (atomic): object CRTC = 71
│ ├───"CRTC_X" (atomic): srange [INT32_MIN, INT32_MAX] = 288
│ ├───"CRTC_Y" (atomic): srange [INT32_MIN, INT32_MAX] = 293
│ ├───"CRTC_W" (atomic): range [0, INT32_MAX] = 256
│ ├───"CRTC_H" (atomic): range [0, INT32_MAX] = 256
│ ├───"SRC_X" (atomic): range [0, UINT32_MAX] = 0
│ ├───"SRC_Y" (atomic): range [0, UINT32_MAX] = 0
│ ├───"SRC_W" (atomic): range [0, UINT32_MAX] = 256
│ ├───"SRC_H" (atomic): range [0, UINT32_MAX] = 256
│ └───"IN_FORMATS" (immutable): blob = 70
│ └───DRM_FORMAT_MOD_LINEAR (0x0)
│ └───ARGB8888 (0x34325241)
When running Sway (a Wayland compositor), the cursor buffer has the same size and pitch, so the issue can't come from those.
The cursor buffer is not displayed properly. It's supposed to be an array but it shows up as a long black and white line which is 1px tall.
Additionally, I see a lot of these messages:
[drm] DC global validation failure: Scaling failure (14)
And even a oops in dcn_validate_bandwidth
:
[ 126.415838] ------------[ cut here ]------------
[ 126.416148] WARNING: CPU: 5 PID: 408 at drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:991 dcn_validate_bandwidth+0x10fb/0x1f90 [amdgpu]
[ 126.416175] Modules linked in: ccm amdgpu ath10k_pci ath10k_core ath mac80211 btusb btrtl btbcm btintel bluetooth uvcvideo libarc4 videobuf2_vmalloc videobuf2_memops videobuf2_v4l2 cfg80211 videobuf2_common kvm_amd videodev kvm snd_hda_codec_hdmi snd_hda_codec_conexant snd_hda_codec_generic ledtrig_audio joydev hid_sensor_accel_3d gpu_sched snd_hda_intel wacom mousedev hid_sensor_trigger hid_sensor_iio_common snd_intel_dspcfg i2c_algo_bit snd_hda_codec ttm usbhid mc crc16 hid_sensor_hub ecdh_generic ecc hid_multitouch hid_generic drm_kms_helper snd_hwdep snd_hda_core nls_iso8859_1 nls_cp437 vfat wmi_bmof fat snd_pcm bmc150_accel_spi snd_timer irqbypass syscopyarea sysfillrect input_leds snd snd_pci_acp3x pcspkr sysimgblt fb_sys_fops cec sp5100_tco i2c_piix4 bmc150_accel_i2c k10temp bmc150_accel_core rc_core soundcore industrialio_triggered_buffer tpm_crb kfifo_buf ideapad_laptop industrialio sparse_keymap tpm_tis wmi tpm_tis_core rfkill tpm i2c_hid battery pinctrl_amd ac hid evdev mac_hid
[ 126.416322] acpi_cpufreq drm agpgart ip_tables x_tables btrfs blake2b_generic libcrc32c crc32c_generic xor raid6_pq dm_crypt dm_mod crct10dif_pclmul sdhci_pci crc32_pclmul crc32c_intel ccp xhci_pci ghash_clmulni_intel cqhci xhci_hcd aesni_intel sdhci serio_raw glue_helper atkbd crypto_simd mmc_core libps2 cryptd i8042 rng_core serio
[ 126.416392] CPU: 5 PID: 408 Comm: kworker/u32:9 Not tainted 5.10.0-rc3-00005-g7ff818f97c30 #4
[ 126.416395] Hardware name: LENOVO 81N6/LNVNB161216, BIOS AGCN25WW(V1.08) 11/13/2019
[ 126.416423] Workqueue: events_unbound commit_work [drm_kms_helper]
[ 126.416725] RIP: 0010:dcn_validate_bandwidth+0x10fb/0x1f90 [amdgpu]
[ 126.416732] Code: 0b e9 3c fb ff ff f3 41 0f 10 8c 24 74 07 01 00 41 0f 2e 8c 24 f4 05 01 00 7a 0f 41 0f 2f 8c 24 f4 05 01 00 0f 84 0b fb ff ff <0f> 0b e9 04 fb ff ff 80 bb e0 01 00 00 01 0f 84 ab 0c 00 00 48 8b
[ 126.416737] RSP: 0018:ffffa8dc0100f9a8 EFLAGS: 00210202
[ 126.416743] RAX: ffff9ede47cc1c00 RBX: 0000000000000000 RCX: 0000000000000018
[ 126.416746] RDX: ffff9ede658e0b88 RSI: 0000000000000006 RDI: 000000000000000c
[ 126.416749] RBP: ffffa8dc0100fa28 R08: ffff9edf726c0000 R09: 0000000100000000
[ 126.416752] R10: 0000000000000000 R11: 0000000000000006 R12: ffff9ede658e0000
[ 126.416754] R13: ffff9ede658e0000 R14: ffff9ede658e01e8 R15: 0000000000000000
[ 126.416758] FS: 0000000000000000(0000) GS:ffff9ee008b40000(0000) knlGS:0000000000000000
[ 126.416762] CS: 0010 DS: 0000 ES: 0000 CR0: 0000000080050033
[ 126.416765] CR2: 00006240008f5000 CR3: 0000000115f26000 CR4: 00000000003506e0
[ 126.416768] Call Trace:
[ 126.417059] dc_commit_updates_for_stream+0xae5/0x1cc0 [amdgpu]
[ 126.417356] amdgpu_dm_atomic_commit_tail+0x1681/0x2680 [amdgpu]
[ 126.417402] commit_tail+0x94/0x130 [drm_kms_helper]
[ 126.417412] process_one_work+0x1d6/0x3a0
[ 126.417419] worker_thread+0x4d/0x3d0
[ 126.417426] ? rescuer_thread+0x410/0x410
[ 126.417430] kthread+0x142/0x160
[ 126.417434] ? __kthread_bind_mask+0x60/0x60
[ 126.417441] ret_from_fork+0x22/0x30
[ 126.417451] CPU: 5 PID: 408 Comm: kworker/u32:9 Not tainted 5.10.0-rc3-00005-g7ff818f97c30 #4
[ 126.417454] Hardware name: LENOVO 81N6/LNVNB161216, BIOS AGCN25WW(V1.08) 11/13/2019
[ 126.417480] Workqueue: events_unbound commit_work [drm_kms_helper]
[ 126.417485] Call Trace:
[ 126.417493] dump_stack+0x6b/0x83
[ 126.417501] __warn.cold+0x24/0x75
[ 126.417784] ? dcn_validate_bandwidth+0x10fb/0x1f90 [amdgpu]
[ 126.417793] report_bug+0x9a/0xc0
[ 126.417802] handle_bug+0x3a/0xa0
[ 126.417808] exc_invalid_op+0x14/0x70
[ 126.417814] asm_exc_invalid_op+0x12/0x20
[ 126.418119] RIP: 0010:dcn_validate_bandwidth+0x10fb/0x1f90 [amdgpu]
[ 126.418127] Code: 0b e9 3c fb ff ff f3 41 0f 10 8c 24 74 07 01 00 41 0f 2e 8c 24 f4 05 01 00 7a 0f 41 0f 2f 8c 24 f4 05 01 00 0f 84 0b fb ff ff <0f> 0b e9 04 fb ff ff 80 bb e0 01 00 00 01 0f 84 ab 0c 00 00 48 8b
[ 126.418131] RSP: 0018:ffffa8dc0100f9a8 EFLAGS: 00210202
[ 126.418135] RAX: ffff9ede47cc1c00 RBX: 0000000000000000 RCX: 0000000000000018
[ 126.418138] RDX: ffff9ede658e0b88 RSI: 0000000000000006 RDI: 000000000000000c
[ 126.418142] RBP: ffffa8dc0100fa28 R08: ffff9edf726c0000 R09: 0000000100000000
[ 126.418144] R10: 0000000000000000 R11: 0000000000000006 R12: ffff9ede658e0000
[ 126.418147] R13: ffff9ede658e0000 R14: ffff9ede658e01e8 R15: 0000000000000000
[ 126.418437] ? dcn_validate_bandwidth+0x1c5/0x1f90 [amdgpu]
[ 126.418727] dc_commit_updates_for_stream+0xae5/0x1cc0 [amdgpu]
[ 126.419015] amdgpu_dm_atomic_commit_tail+0x1681/0x2680 [amdgpu]
[ 126.419066] commit_tail+0x94/0x130 [drm_kms_helper]
[ 126.419075] process_one_work+0x1d6/0x3a0
[ 126.419080] worker_thread+0x4d/0x3d0
[ 126.419086] ? rescuer_thread+0x410/0x410
[ 126.419090] kthread+0x142/0x160
[ 126.419094] ? __kthread_bind_mask+0x60/0x60
[ 126.419101] ret_from_fork+0x22/0x30
[ 126.419126] ---[ end trace 344bb09014179e74 ]---
Hardware description:
- CPU: AMD Ryzen 5 3500U
- GPU: APU (PCI 1002:15d8 Advanced Micro Devices, Inc. [AMD/ATI] Picasso)
- System Memory: 6GiB
- Display(s): integrated screen
- Type of Diplay Connection: eDP
System infomration:
- Distro name and Version: Arch Linux
- Kernel version: ~agd5f/linux, drm-next branch, commit 7ff818f97c30
- Custom kernel: N/A
- AMD package version: N/A
How to reproduce the issue:
- Clone gamescope
- Apply this patch: https://github.com/Plagman/gamescope/pull/135
- Build gamescope
- Run it with Steam, disable scaling and enable use of KMS planes:
build/gamescope -e -l -d -w 1920 -h 1080 -- steam -tenfoot -steamos >gamescope.log 2>&1
(replace-w
and-h
with you screen's resolution) - Start Portal 1
Additional information
- dmesg log: https://l.sr.ht/ez5l.log
- drm_info dump of the KMS state: https://l.sr.ht/I3kH.txt