Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/intel/kms_pm_dc: Add DC5 negative test for continuous page-flip activity
@ 2026-03-16 11:15 Mohammed Thasleem
  2026-03-17  5:30 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 11+ messages in thread
From: Mohammed Thasleem @ 2026-03-16 11:15 UTC (permalink / raw)
  To: igt-dev; +Cc: imre.deak, Mohammed Thasleem

This test validates that DC5 entry that shouldn't entered when the display
engine is kept continuously busy with back-to-back page-flips. The test
performs a tight flip loop for 10 seconds, alternating between two fb's
with no delays between flips.

It monitors the DC5 counter to ensure no state transitions occur during
active display operations, validating proper power management behavior.

Signed-off-by: Mohammed Thasleem <mohammed.thasleem@intel.com>
---
 tests/intel/kms_pm_dc.c | 57 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 57 insertions(+)

diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 39e94f36b..0d0e09780 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -77,6 +77,9 @@
  *
  * SUBTEST: dc5-retention-flops
  * Description: This test validates display engine entry to DC5 state while PSR is active on Pipe B
+ *
+ * SUBTEST: dc5-negative-tight-flip
+ * Description: This test validates that DC5 state is not entered during continuous tight page-flips
  */
 
 #define PWR_DOMAIN_INFO "i915_power_domain_info"
@@ -601,6 +604,49 @@ static void test_deep_pkgc_state(data_t *data)
 	igt_assert_f(pkgc_flag, "PKGC10 is not achieved.\n");
 }
 
+static void test_dc5_negative_tight_flip(data_t *data, int dc_flag)
+{
+	igt_plane_t *primary;
+	uint32_t dc5_prev_counter;
+	time_t duration = 10;
+	bool flip = false;
+	time_t start;
+
+	igt_require_dc_counter(data->debugfs_fd, dc_flag);
+
+	setup_output(data);
+	setup_videoplayback(data);
+
+	primary = igt_output_get_plane_type(data->output,
+					     DRM_PLANE_TYPE_PRIMARY);
+
+	igt_plane_set_fb(primary, &data->fb_rgb);
+	igt_display_commit(&data->display);
+
+	dc5_prev_counter = igt_read_dc_counter(data->debugfs_fd, dc_flag);
+
+	/*
+	 * Tight flip loop for 10 seconds.
+	 * no delay in between flips - here display engine remains continuously busy.
+	 */
+	start = time(NULL);
+	while (time(NULL) - start < duration) {
+		flip = !flip;
+
+		igt_plane_set_fb(primary,
+				 flip ? &data->fb_rgb : &data->fb_rgr);
+
+		igt_display_commit(&data->display);
+	}
+
+	igt_assert_f(igt_read_dc_counter(data->debugfs_fd, dc_flag) == dc5_prev_counter,
+		     "DC5 state not achived during tight flip loop\n%s:\n%s\n",
+		     PWR_DOMAIN_INFO, data->debugfs_dump = igt_sysfs_get(data->debugfs_fd,
+		     PWR_DOMAIN_INFO));
+
+	cleanup_dc3co_fbs(data);
+}
+
 static void kms_poll_state_restore(int sig)
 {
 	int sysfs_fd;
@@ -695,6 +741,17 @@ int igt_main()
 		test_dc5_retention_flops(&data, IGT_INTEL_CHECK_DC5);
 	}
 
+	igt_describe("This test validates that DC5 state is not entered during "
+		     "continuous tight page-flips");
+	igt_subtest("dc5-negative-tight-flip") {
+		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);
+		igt_require(!psr_disabled_check(data.debugfs_fd));
+		test_dc5_negative_tight_flip(&data, IGT_INTEL_CHECK_DC5);
+	}
+
 	igt_describe("This test validates negative scenario of DC5 display "
 		     "engine entry to DC5 state while all connectors's DPMS "
 		     "property set to ON");
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2026-06-09  5:56 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-16 11:15 [PATCH i-g-t] tests/intel/kms_pm_dc: Add DC5 negative test for continuous page-flip activity Mohammed Thasleem
2026-03-17  5:30 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-03-17 11:19 ` ✓ i915.CI.BAT: " Patchwork
2026-03-18 10:29 ` ✓ Xe.CI.FULL: " Patchwork
2026-06-05  9:42 ` [PATCH i-g-t] " Shankar, Uma
2026-06-08  7:30 ` Mohammed Thasleem
2026-06-08 10:34   ` Shankar, Uma
2026-06-08 22:33 ` ✓ Xe.CI.BAT: success for tests/intel/kms_pm_dc: Add DC5 negative test for continuous page-flip activity (rev2) Patchwork
2026-06-08 22:46 ` ✓ i915.CI.BAT: " Patchwork
2026-06-09  1:05 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-06-09  5:56 ` ✗ i915.CI.Full: " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox