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: Add amdgpu_dm_crtc_init tests
why: amdgpu_dm_crtc_init builds a CRTC with its primary and cursor planes, resets its state, and records it in mode_info, but had no coverage for either the default or the degamma-enabled configuration path. how: Add dm_test_crtc_init_registers_crtc for the default (has_degamma == false) path and dm_test_crtc_init_enables_degamma for the DCN DPP (has_degamma == true) path. Both set up an adev, dc with ctx, and a primary plane, call amdgpu_dm_crtc_init, and verify it returns 0, registers the CRTC, and initializes the expected fields, then tear down the reset state, CRTC, and cursor plane the function allocated. The remaining branches are allocation failures and unreachable defensive paths not drivable under KUnit. Reviewed-by: Alex Hung <alex.hung@amd.com> Signed-off-by: Bhawanpreet Lakha <bhawanpreet.lakha@amd.com> Signed-off-by: Tom Chung <chiahsuan.chung@amd.com> Tested-by: Daniel Wheeler <daniel.wheeler@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
parent
355aa2dbf0
commit
604a3017dd
2 changed files with 122 additions and 0 deletions
Loading…
Add table
Add a link
Reference in a new issue