RE: [PATCH v2 2/2] tests/intel/kms_pm_dc: Add DC5 PSR suspend/resume validation test

B, Jeevan
2026-03-11T10:17:40Z

> -----Original Message-----
> From: igt-dev <igt-dev-bounces@lists.freedesktop.org> On Behalf Of Mohammed
> Thasleem
> Sent: Thursday, January 22, 2026 11:52 PM
> To: igt-dev@lists.freedesktop.org
> Cc: Thasleem, Mohammed <mohammed.thasleem@intel.com>
> Subject: [PATCH v2 2/2] tests/intel/kms_pm_dc: Add DC5 PSR suspend/resume
> validation test
>
> This test validates display engine entry to DC5 state while PSR is active, performs
> suspend/resume cycle, and verifies DC5 entry is restored after resume.
>
> Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
> ---
> tests/intel/kms_pm_dc.c | 21 +++++++++++++++++++++
> 1 file changed, 21 insertions(+)
>
> diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c index
> fde16ebf7..8cdbfad9f 100644
> --- a/tests/intel/kms_pm_dc.c
> +++ b/tests/intel/kms_pm_dc.c
> @@ -80,6 +80,10 @@
> *
> * SUBTEST: dc5-dpms-suspend-resume
> * Description: This test validate DC5 state entry before and after
> suspend/resume cycle using DPMS
> + *
> + * SUBTEST: dc5-psr-suspend-resume
> + * Description: This test validates display engine entry to DC5 state while PSR is
> active
> + * before and after respend/resume cycle
> */
>
> /* DC State Flags */
> @@ -732,6 +736,13 @@ static void test_dc5_dpms_suspend_resume(data_t
> *data, int dc_flag)
>
> }
>
> +static void test_dc5_psr_suspend_resume(data_t *data, int dc_flag) {
> + test_dc_state_psr(data, dc_flag);
> + igt_system_suspend_autoresume(SUSPEND_STATE_MEM,
> SUSPEND_TEST_NONE);
> + test_dc_state_psr(data, dc_flag);
> +}
> +
> static void kms_poll_state_restore(int sig) {
> int sysfs_fd;
> @@ -857,6 +868,16 @@ int igt_main()
> igt_subtest("dc5-dpms-suspend-resume")
> test_dc5_dpms_suspend_resume(&data, CHECK_DC5);
>
> + igt_describe("This test validates display engine entry to DC5 state "
> + "while PSR is active before and after suspend/resume cycle");
> + igt_subtest("dc5-psr-suspend-resume") {
> + igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
> + PSR_MODE_1, NULL));
> + data.op_psr_mode = PSR_MODE_1;
> + psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode,
> NULL);
> + test_dc5_psr_suspend_resume(&data, CHECK_DC5);
> + }
> +
This test currently validates the DC counter by comparing the value before PSR entry and after waiting for PSR to enter.
If we want to include suspend/resume validation as part of this test, shouldn't the flow be:

1. Read the DC counter.
2. Perform suspend/resume.
3. Wait for PSR entry again.
4. Read the DC counter after resume.
5. Validate the counter using `check_dc_counter()`.

This would ensure that the DC state entry is also validated after the suspend/resume cycle.
Same goes for patch 1 also.

Thanks
Jeevan B
> igt_fixture() {
> free(data.debugfs_dump);
> close(data.debugfs_fd);
> --
> 2.25.1