From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: pranay.samala@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t v2 3/4] tests/intel/kms_psr_stress_test: Select PSR-capable output
Date: Wed, 25 Mar 2026 22:21:39 +0530 [thread overview]
Message-ID: <20260325165140.115520-4-jeevan.b@intel.com> (raw)
In-Reply-To: <20260325165140.115520-1-jeevan.b@intel.com>
Iterate over all eDP outputs and select one that supports PSR
instead of picking the first available eDP. Skip the test only
if no PSR-capable output is found.
Previously, the test relied on a global PSR capability check and
could select an eDP panel without PSR support on systems with
multiple eDPs. This could lead to incorrect behavior. this ensures
the test runs only on a valid PSR sink and avoids unnecessary
failures on multi-eDP systems.
v2: Drop redundant 'found' variable.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_psr_stress_test.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/tests/intel/kms_psr_stress_test.c b/tests/intel/kms_psr_stress_test.c
index 09e73bd49..0c9f0a0ef 100644
--- a/tests/intel/kms_psr_stress_test.c
+++ b/tests/intel/kms_psr_stress_test.c
@@ -93,6 +93,10 @@ static void setup_output(data_t *data)
if (c->connector_type != DRM_MODE_CONNECTOR_eDP)
continue;
+ if (!psr_sink_support(data->drm_fd, data->debugfs_fd,
+ PSR_MODE_1, output))
+ continue;
+
igt_display_reset(display);
igt_output_set_crtc(output,
crtc);
@@ -107,7 +111,7 @@ static void setup_output(data_t *data)
return;
}
- igt_require(data->output);
+ igt_require_f(data->output, "No eDP output with PSR support found\n");
}
static void primary_draw(data_t *data, struct igt_fb *fb, uint8_t i)
@@ -232,7 +236,7 @@ static void prepare(data_t *data)
r = timerfd_settime(data->completed_timerfd, 0, &interval, NULL);
igt_require_f(r != -1, "Error setting completed_timerfd\n");
- data->initial_state = psr_get_mode(data->debugfs_fd, NULL);
+ data->initial_state = psr_get_mode(data->debugfs_fd, data->output);
igt_require(data->initial_state != PSR_DISABLED);
igt_require(psr_wait_entry(data->debugfs_fd, data->initial_state, data->output));
}
@@ -345,7 +349,7 @@ static void run(data_t *data)
}
/* Check if after all this stress the PSR is still in the same state */
- igt_assert(psr_get_mode(data->debugfs_fd, NULL) == data->initial_state);
+ igt_assert(psr_get_mode(data->debugfs_fd, data->output) == data->initial_state);
psr_sink_error_check(data->debugfs_fd, data->initial_state, data->output);
}
@@ -359,10 +363,6 @@ int igt_main()
data.bops = buf_ops_create(data.drm_fd);
kmstest_set_vt_graphics_mode();
- igt_require_f(psr_sink_support(data.drm_fd, data.debugfs_fd,
- PSR_MODE_1, NULL),
- "Sink does not support PSR\n");
-
setup_output(&data);
data.invalidate_timerfd = timerfd_create(CLOCK_MONOTONIC, 0);
--
2.43.0
next prev parent reply other threads:[~2026-03-25 16:53 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-25 16:51 [PATCH i-g-t v2 0/4] Fix PSR handling for multi-eDP systems Jeevan B
2026-03-25 16:51 ` [PATCH i-g-t v2 1/4] tests/intel/kms_fbc_dirty_rect: Use per-output PSR check before disabling Jeevan B
2026-03-26 8:40 ` Samala, Pranay
2026-03-25 16:51 ` [PATCH i-g-t v2 2/4] tests/kms_vrr: Avoid unnecessary PSR disable Jeevan B
2026-04-01 12:30 ` Naladala, Ramanaidu
2026-03-25 16:51 ` Jeevan B [this message]
2026-03-26 8:44 ` [PATCH i-g-t v2 3/4] tests/intel/kms_psr_stress_test: Select PSR-capable output Samala, Pranay
2026-03-25 16:51 ` [PATCH i-g-t v2 4/4] tests/intel/kms_pm_dc: Scope PSR handling to output Jeevan B
2026-03-26 3:45 ` ✓ i915.CI.BAT: success for Fix PSR handling for multi-eDP systems (rev3) Patchwork
2026-03-26 3:48 ` ✓ Xe.CI.BAT: " Patchwork
2026-03-26 16:10 ` ✓ Xe.CI.FULL: " Patchwork
2026-03-26 18:49 ` ✗ i915.CI.Full: failure " 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=20260325165140.115520-4-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=pranay.samala@intel.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