mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/
synced 2026-11-10 20:48:12 +00:00
drm/amd/display: Test VBIOS bounding box
[WHAT] Add KUnit tests for dm_dmub_get_vbios_bounding_box(), covering the successful handshake on every ASIC that has a bounding box, the GPU memory allocation failure path, and both GPINT timeout paths. This also covers dm_dmub_send_vbios_gpint_command(). [HOW] Extend the fake CGS device with a fail_on_write hook so a chosen GPINT write is never acked, which drives the timeout paths without waiting on real firmware. Reuse the buffer object indirection added for dm_allocate_gpu_mem() with a fake allocator, since the real path needs a live TTM device. The success test walks every ASIC with a bounding box and confirms a non-zero GART buffer is allocated and that all four address words plus the copy request are sent. The timeout tests confirm the buffer is released and the allocation list left empty. Assisted-by: Copilot:Claude-Opus-5 Reviewed-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Ivan Lipski <ivan.lipski@amd.com> Tested-by: Dan Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
b62da90db8
commit
7527232a60
1 changed files with 187 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue