From: Jeevan B <jeevan.b@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: jouni.hogander@intel.com, Jeevan B <jeevan.b@intel.com>
Subject: [PATCH i-g-t 4/4] tests/intel/kms_pm_dc: Scope PSR handling to output
Date: Mon, 23 Mar 2026 14:42:05 +0530 [thread overview]
Message-ID: <20260323091205.100585-5-jeevan.b@intel.com> (raw)
In-Reply-To: <20260323091205.100585-1-jeevan.b@intel.com>
Stop using global PSR checks by passing NULL to PSR helpers.
Select a PSR-capable eDP output and scope PSR enablement and
verification to that output.
This fixes incorrect behavior on multi-eDP systems where PSR
capability differs across panels.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 26 ++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 39e94f36b..1a88c54bd 100644
--- a/tests/intel/kms_pm_dc.c
+++ b/tests/intel/kms_pm_dc.c
@@ -162,6 +162,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,
+ data->op_psr_mode, output))
+ continue;
+
igt_output_set_crtc(output, crtc);
data->output = output;
data->mode = igt_output_get_mode(output);
@@ -318,9 +322,8 @@ static void check_dc3co_with_videoplayback_like_load(data_t *data)
static void setup_dc3co(data_t *data)
{
- data->op_psr_mode = PSR_MODE_2;
- psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode, NULL);
- igt_require_f(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, NULL),
+ psr_enable(data->drm_fd, data->debugfs_fd, data->op_psr_mode, data->output);
+ igt_require_f(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, data->output),
"PSR2 is not enabled\n");
}
@@ -342,7 +345,7 @@ static void test_dc5_retention_flops(data_t *data, int dc_flag)
dc_counter_before_psr = igt_read_dc_counter(data->debugfs_fd, dc_flag);
set_output_on_pipe_b(data);
setup_primary(data);
- igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, NULL));
+ igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, data->output));
check_dc_counter(data, dc_flag, dc_counter_before_psr);
cleanup_dc_psr(data);
}
@@ -356,7 +359,7 @@ static void test_dc_state_psr(data_t *data, int dc_flag)
setup_output(data);
setup_primary(data);
igt_require(!psr_disabled_check(data->debugfs_fd));
- igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, NULL));
+ igt_assert(psr_wait_entry(data->debugfs_fd, data->op_psr_mode, data->output));
check_dc_counter(data, dc_flag, dc_counter_before_psr);
psr_sink_error_check(data->debugfs_fd, data->op_psr_mode, data->output);
cleanup_dc_psr(data);
@@ -615,6 +618,7 @@ static void kms_poll_state_restore(int sig)
int igt_main()
{
data_t data = {};
+ data.op_psr_mode = PSR_MODE_1;
igt_fixture() {
data.drm_fd = drm_open_driver_master(DRIVER_INTEL | DRIVER_XE);
@@ -640,8 +644,9 @@ int igt_main()
igt_describe("In this test we make sure that system enters DC3CO "
"when PSR2 is active and system is in SLEEP state");
igt_subtest("dc3co-vpb-simulation") {
+ data.op_psr_mode = PSR_MODE_2;
igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
- PSR_MODE_2, NULL));
+ data.op_psr_mode, NULL));
test_dc3co_vpb_simulation(&data);
}
@@ -649,8 +654,7 @@ int igt_main()
"while PSR is active");
igt_subtest("dc5-psr") {
igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
- PSR_MODE_1, NULL));
- data.op_psr_mode = PSR_MODE_1;
+ data.op_psr_mode, NULL));
psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode, NULL);
test_dc_state_psr(&data, IGT_INTEL_CHECK_DC5);
}
@@ -659,8 +663,7 @@ int igt_main()
"while PSR is active");
igt_subtest("dc6-psr") {
igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
- PSR_MODE_1, NULL));
- data.op_psr_mode = PSR_MODE_1;
+ data.op_psr_mode, NULL));
psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode, NULL);
igt_require_f(igt_pm_pc8_plus_residencies_enabled(data.msr_fd),
"PC8+ residencies not supported\n");
@@ -688,8 +691,7 @@ int igt_main()
igt_require_f(intel_display_ver(data.devid) >= 30,
"Test not supported on this platform.\n");
igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
- PSR_MODE_1, NULL));
- data.op_psr_mode = PSR_MODE_1;
+ data.op_psr_mode, NULL));
psr_enable(data.drm_fd, data.debugfs_fd, data.op_psr_mode, NULL);
igt_require(!psr_disabled_check(data.debugfs_fd));
test_dc5_retention_flops(&data, IGT_INTEL_CHECK_DC5);
--
2.43.0
next prev parent reply other threads:[~2026-03-23 9:13 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-23 9:12 [PATCH i-g-t 0/4] Fix PSR handling for multi-eDP systems Jeevan B
2026-03-23 9:12 ` [PATCH i-g-t 1/4] tests/intel/kms_fbc_dirty_rect: Avoid unnecessary PSR disable Jeevan B
2026-03-25 14:49 ` Samala, Pranay
2026-03-25 15:12 ` Samala, Pranay
2026-03-23 9:12 ` [PATCH i-g-t 2/4] tests/kms_vrr: " Jeevan B
2026-03-23 9:12 ` [PATCH i-g-t 3/4] tests/intel/kms_psr_stress_test: Select PSR-capable output Jeevan B
2026-03-25 15:38 ` Samala, Pranay
2026-03-23 9:12 ` Jeevan B [this message]
2026-03-23 14:41 ` ✓ Xe.CI.BAT: success for Fix PSR handling for multi-eDP systems (rev2) Patchwork
2026-03-23 16:08 ` ✓ i915.CI.BAT: " Patchwork
2026-03-23 16:08 ` Patchwork
2026-03-23 20:24 ` ✗ Xe.CI.FULL: failure " Patchwork
2026-03-23 22:59 ` ✗ 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=20260323091205.100585-5-jeevan.b@intel.com \
--to=jeevan.b@intel.com \
--cc=igt-dev@lists.freedesktop.org \
--cc=jouni.hogander@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