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 DMUB reg callbacks
[WHAT] Add KUnit tests for amdgpu_dm_dmub_reg_read() and amdgpu_dm_dmub_reg_write(), the register accessors the DMUB service is created with. [HOW] Both accessors reach the hardware through cgs_read_register() and cgs_write_register(), which dispatch through the ops table at the start of struct cgs_device. Add a fake CGS device that records the offset and value of each access, so the callbacks can be driven without real MMIO. The test writes a value through the write callback and reads it back through the read callback, confirming both forward to the DC context of the device passed as their opaque user context. 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
99c52fb371
commit
9ebd70b746
3 changed files with 101 additions and 4 deletions
Loading…
Add table
Add a link
Reference in a new issue