public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Ville Syrjala <ville.syrjala@linux.intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [PATCH i-g-t] tests/intel/kms_busy: Verify display reset happened
Date: Thu,  9 Apr 2026 23:09:24 +0300	[thread overview]
Message-ID: <20260409200924.5409-1-ville.syrjala@linux.intel.com> (raw)

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

Use the new "display_reset_count" debugfs file to confirm that the
kernel did in fact perform the display reset.

Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
---
This will blow up in CI because the debugs file is not yet there.

 tests/intel/kms_busy.c | 16 ++++++++++++++--
 1 file changed, 14 insertions(+), 2 deletions(-)

diff --git a/tests/intel/kms_busy.c b/tests/intel/kms_busy.c
index e82380276666..066c6d34b8f9 100644
--- a/tests/intel/kms_busy.c
+++ b/tests/intel/kms_busy.c
@@ -35,6 +35,7 @@
 
 #include "i915/gem.h"
 #include "igt.h"
+#include "igt_sysfs.h"
 
 /**
  * SUBTEST: basic
@@ -413,6 +414,11 @@ static void gpu_engines_restore_timeouts(int fd, int num_engines, const struct g
 		gem_engine_properties_restore(fd, &props[i]);
 }
 
+static uint32_t display_reset_count(int drm_fd)
+{
+	return igt_sysfs_get_u32(igt_debugfs_dir(drm_fd), "display_reset_count");
+}
+
 const char *help_str =
 	"  -e \tRun on all pipes. (By default subtests will run on two pipes)\n";
 
@@ -549,16 +555,22 @@ int igt_main_args("e", NULL, help_str, opt_handler, NULL)
 					continue;
 
 				igt_dynamic_f("pipe-%s", igt_crtc_name(crtc)) {
-					if (tests[i].reset)
+					uint32_t reset_count_pre = 0;
+
+					if (tests[i].reset) {
 						igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 1);
+						reset_count_pre = display_reset_count(display.drm_fd);
+					}
 
 					test_hang(&display,
 						  crtc,
 						  output,
 						  tests[i].modeset, tests[i].hang_newfb);
 
-					if (tests[i].reset)
+					if (tests[i].reset) {
 						igt_set_module_param_int(display.drm_fd, "force_reset_modeset_test", 0);
+						igt_assert_neq(reset_count_pre, display_reset_count(display.drm_fd));
+					}
 				}
 			}
 
-- 
2.52.0


             reply	other threads:[~2026-04-09 20:09 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 20:09 Ville Syrjala [this message]
2026-04-10  3:34 ` ✓ Xe.CI.BAT: success for tests/intel/kms_busy: Verify display reset happened Patchwork
2026-04-10  3:50 ` ✓ i915.CI.BAT: " Patchwork
2026-04-10  8:37 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-04-10 23:27 ` ✗ i915.CI.Full: " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260409200924.5409-1-ville.syrjala@linux.intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox