[PATCH i-g-t] tests/kms_flip: Add flip-vs-dpms-on-nop subtest

Ville Syrjala ville.syrjala at linux.intel.com
Fri Feb 28 19:42:40 UTC 2025


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Verify that redundant DPMS ON requests don't result in
actual commits (and thus frame drops). This behaviour
is guaranteed by the kernel for atomic drivers.

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 tests/kms_flip.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 3ad4d0afb1f6..59740aca25bd 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -176,6 +176,7 @@
  * @single-buffer-flip-vs-dpms-off-vs-modeset: pageflip of same buffer along with
  *                                             the modeset and dpms off
  * @dpms-vs-vblank-race:                       vblank along with the dpms & modeset
+ * @flip-vs-dpms-on-nop:                       pageflip and issue nop DPMS ON
  */
 
 /**
@@ -240,6 +241,7 @@
  */
 
 #define TEST_DPMS		(1 << 0)
+#define TEST_DPMS_ON_NOP	(1 << 1)
 
 #define TEST_PAN		(1 << 3)
 #define TEST_MODESET		(1 << 4)
@@ -957,7 +959,7 @@ static bool run_test_step(struct test_output *o, unsigned int *events)
 	if (o->flags & TEST_MODESET)
 		igt_assert(set_mode(o, o->fb_ids[o->current_fb_id], 0, 0) == 0);
 
-	if (o->flags & TEST_DPMS)
+	if (o->flags & (TEST_DPMS | TEST_DPMS_ON_NOP))
 		set_dpms(o, DRM_MODE_DPMS_ON);
 
 	if (o->flags & TEST_VBLANK_RACE) {
@@ -2020,6 +2022,7 @@ igt_main_args("e", NULL, help_str, opt_handler, NULL)
 			"plain-flip-fb-recreate" },
 		{ 30, TEST_FLIP | TEST_RMFB | TEST_MODESET , "flip-vs-rmfb" },
 		{ 2, TEST_FLIP | TEST_DPMS | TEST_EINVAL | TEST_BASIC, "flip-vs-dpms" },
+		{ 2, TEST_FLIP | TEST_DPMS_ON_NOP | TEST_CHECK_TS, "flip-vs-dpms-on-nop" },
 		{ 30,  TEST_FLIP | TEST_PAN, "flip-vs-panning" },
 		{ 2, TEST_FLIP | TEST_MODESET | TEST_EINVAL | TEST_BASIC, "flip-vs-modeset" },
 		{ 30,  TEST_FLIP | TEST_VBLANK_EXPIRED_SEQ,
-- 
2.45.3



More information about the igt-dev mailing list