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_init_microcode
[WHAT] Add KUnit tests for dm_init_microcode(), covering the ASIC to firmware name mapping for all 21 supported IP versions and the firmware request failure path. [HOW] The real amdgpu_ucode_request() reaches the firmware loader, so add a KUnit-only indirection table for it. The default table entry points at the existing function, so no test-only wrapper is introduced, and the prototype is mirrored verbatim so an upstream change fails the build at the default initializer rather than diverging silently. Tests install a fake that records the formatted firmware name, letting a single table-driven case assert the name chosen for every ASIC, including the Green Sardine revision check and the Sienna Cichlid versus Navy Flounder split on the graphics IP version. 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
7527232a60
commit
101ff514db
3 changed files with 148 additions and 2 deletions
Loading…
Add table
Add a link
Reference in a new issue