Kernel panic when using 2 overlays (index 3 is out of range for type 'dc_surface_update [3]')
I am getting this crash every time on mainline when Weston starts using 2 overlay planes...
[sob sie 31 20:12:25 2024] ------------[ cut here ]------------
[sob sie 31 20:12:25 2024] UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:8832:26
[sob sie 31 20:12:25 2024] index 3 is out of range for type 'dc_surface_update [3]'
[sob sie 31 20:12:25 2024] CPU: 9 UID: 0 PID: 273756 Comm: kworker/u64:9 Tainted: G W 6.11.0-0.rc5.20240830gt20371ba1.346.vanilla.fc40.x86_64 #1
[sob sie 31 20:12:25 2024] Tainted: [W]=WARN
[sob sie 31 20:12:25 2024] Hardware name: ASUSTeK COMPUTER INC. ASUS Zenbook 14 UM3406HA_UM3406HA/UM3406HA, BIOS UM3406HA.304 06/05/2024
[sob sie 31 20:12:25 2024] Workqueue: events_unbound commit_work
[sob sie 31 20:12:25 2024] Call Trace:
[sob sie 31 20:12:25 2024] <TASK>
[sob sie 31 20:12:25 2024] dump_stack_lvl+0x5d/0x80
[sob sie 31 20:12:25 2024] ubsan_epilogue+0x5/0x30
[sob sie 31 20:12:25 2024] __ubsan_handle_out_of_bounds.cold+0x46/0x4b
[sob sie 31 20:12:25 2024] amdgpu_dm_atomic_commit_tail+0x3d1a/0x4420 [amdgpu]
[sob sie 31 20:12:25 2024] commit_tail+0xac/0x160
[sob sie 31 20:12:25 2024] ? srso_alias_return_thunk+0x5/0xfbef5
[sob sie 31 20:12:25 2024] process_one_work+0x176/0x330
[sob sie 31 20:12:25 2024] worker_thread+0x24a/0x380
[sob sie 31 20:12:25 2024] ? __pfx_worker_thread+0x10/0x10
[sob sie 31 20:12:25 2024] kthread+0xcf/0x100
[sob sie 31 20:12:25 2024] ? __pfx_kthread+0x10/0x10
[sob sie 31 20:12:25 2024] ret_from_fork+0x31/0x50
[sob sie 31 20:12:25 2024] ? __pfx_kthread+0x10/0x10
[sob sie 31 20:12:25 2024] ret_from_fork_asm+0x1a/0x30
[sob sie 31 20:12:25 2024] </TASK>
[sob sie 31 20:12:25 2024] ---[ end trace ]---
[sob sie 31 20:12:25 2024] ------------[ cut here ]------------
then repeats with dc_flip_addrs[3]. screen becomes frozen, ssh is responsive