public inbox for igt-dev@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Alex Hung <alex.hung@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <alex.hung@amd.com>, <sunpeng.li@amd.com>, <Ethan.Cheung@amd.com>
Subject: [PATCH] tests/kms_flip: Fix regression on non-Intel devices in event_loop
Date: Thu, 9 Apr 2026 17:28:07 -0600	[thread overview]
Message-ID: <20260409232807.631457-1-alex.hung@amd.com> (raw)

Guard the device-id query with is_intel_device() so the "wa" flag is
only computed on Intel hardware, restoring the pre-regression behavior
for all other drivers.

This fixes the following regression:

(kms_flip:15463) intel_chipset-CRITICAL: Test assertion failure function intel_get_drm_devid, file ../lib/intel_chipset.c:145:
(kms_flip:15463) intel_chipset-CRITICAL: Failed assertion: is_intel_device(fd)

Fixes: 2a9f1c1ae ("tests/kms_flip: test suspend at most twice on SNB && BMG")
Signed-off-by: Alex Hung <alex.hung@amd.com>
---
 tests/kms_flip.c | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tests/kms_flip.c b/tests/kms_flip.c
index 81fa8dd5c..1ef9492ba 100755
--- a/tests/kms_flip.c
+++ b/tests/kms_flip.c
@@ -1327,11 +1327,12 @@ static bool event_loop(struct test_output *o, unsigned duration_ms,
 	unsigned long start, end;
 	uint32_t devid;
 	int count = 0;
-	bool wa;
+	bool wa = false;
 
-	devid = intel_get_drm_devid(drm_fd);
-
-	wa = IS_SANDYBRIDGE(devid) || IS_BATTLEMAGE(devid);
+	if (is_intel_device(drm_fd)) {
+		devid = intel_get_drm_devid(drm_fd);
+		wa = IS_SANDYBRIDGE(devid) || IS_BATTLEMAGE(devid);
+	}
 
 	start = gettime_us();
 
-- 
2.43.0


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

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-04-09 23:28 Alex Hung [this message]
2026-04-10  4:52 ` ✓ i915.CI.BAT: success for tests/kms_flip: Fix regression on non-Intel devices in event_loop Patchwork
2026-04-10  4:57 ` ✓ Xe.CI.BAT: " Patchwork
2026-04-10  8:17 ` [PATCH] " Michał Grzelak
2026-04-10 11:23 ` ✓ Xe.CI.FULL: success for " Patchwork
2026-04-10 11:44 ` [PATCH] " Kamil Konieczny
2026-04-11  1:23 ` ✗ i915.CI.Full: failure for " 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=20260409232807.631457-1-alex.hung@amd.com \
    --to=alex.hung@amd.com \
    --cc=Ethan.Cheung@amd.com \
    --cc=igt-dev@lists.freedesktop.org \
    --cc=sunpeng.li@amd.com \
    /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