]> git.hungrycats.org Git - linux/commit
drm/amd/display: Add KUnit tests for amdgpu_dm_psr_set_event
authorAlex Hung <alex.hung@amd.com>
Fri, 15 May 2026 22:09:48 +0000 (16:09 -0600)
committerAlex Deucher <alexander.deucher@amd.com>
Wed, 3 Jun 2026 17:41:56 +0000 (13:41 -0400)
commit34f281489976fb20fe8be12f084055b5560a3190
tree6411600938c8a66d355b1c609536fb20e0a39450
parent64aa07084a0d44541d022ac1dd2d8c03ba5b222c
drm/amd/display: Add KUnit tests for amdgpu_dm_psr_set_event

[Why & How]
Add three KUnit tests covering the early-exit validation guard in
amdgpu_dm_psr_set_event():

  - NULL stream argument returns false immediately
  - Valid stream with NULL link returns false
  - Valid stream/link with psr_feature_enabled == false returns false

Assisted-by: Copilot:Claude-Sonnet-4.6
Reviewed-by: Ray Wu <ray.wu@amd.com>
Signed-off-by: Alex Hung <alex.hung@amd.com>
Signed-off-by: Ray Wu <ray.wu@amd.com>
Tested-by: Daniel Wheeler <daniel.wheeler@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.c
drivers/gpu/drm/amd/display/amdgpu_dm/amdgpu_dm_psr.h
drivers/gpu/drm/amd/display/amdgpu_dm/tests/amdgpu_dm_psr_test.c