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 dm_dmub_sw_init
[WHAT] Add KUnit tests for dm_dmub_sw_init(), covering the ASIC to DMUB service mapping for all 19 supported IP versions, the memory domain choice, a complete successful init, the BSS data region variant and the PSP firmware load registration. [HOW] The framebuffer allocation needs a live TTM device, so add amdgpu_bo_create_kernel() to the indirection table introduced for the firmware request. The ASIC mapping and memory domain tests force that allocation to fail, which walks every ASIC through DMUB service creation and region calculation without a fake framebuffer. Grow the fake firmware so its instruction constant region is larger than two PSP footers. The footer probing in dmub_srv_get_fw_meta_info_from_raw_fw() walks back from the end of that region twice, so a region smaller than the footers underflows the size and reads out of bounds. 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
101ff514db
commit
b0098f52a3
3 changed files with 193 additions and 9 deletions
Loading…
Add table
Add a link
Reference in a new issue