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 v3 4/4] tests/intel/kms_pm_dc: Scope PSR handling to output
Date: Thu, 16 Apr 2026 09:23:33 +0530 [thread overview]
Message-ID: <20260416035333.69004-5-jeevan.b@intel.com> (raw)
In-Reply-To: <20260416035333.69004-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.
v2: Keep op_psr_mode assignment explicit per subtest.
Signed-off-by: Jeevan B <jeevan.b@intel.com>
---
tests/intel/kms_pm_dc.c | 28 ++++++++++++++++------------
1 file changed, 16 insertions(+), 12 deletions(-)
diff --git a/tests/intel/kms_pm_dc.c b/tests/intel/kms_pm_dc.c
index 8138933d4..423a5c4a4 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);
@@ -658,17 +661,18 @@ 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);
}
igt_describe("This test validates display engine entry to DC5 state "
"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;
+ igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
+ 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);
}
@@ -676,9 +680,9 @@ int igt_main()
igt_describe("This test validates display engine entry to DC6 state "
"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;
+ igt_require(psr_sink_support(data.drm_fd, data.debugfs_fd,
+ 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");
@@ -703,11 +707,11 @@ int igt_main()
igt_describe("This test validates display engine entry to DC5 state "
"while PSR is active on Pipe B");
igt_subtest("dc5-retention-flops") {
+ data.op_psr_mode = PSR_MODE_1;
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-04-16 3:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-16 3:53 [PATCH i-g-t v3 0/4] Fix PSR handling for multi-eDP systems Jeevan B
2026-04-16 3:53 ` [PATCH i-g-t v3 1/4] tests/intel/kms_fbc_dirty_rect: Use per-output PSR check before disabling Jeevan B
2026-04-16 3:53 ` [PATCH i-g-t v3 2/4] tests/kms_vrr: Avoid unnecessary PSR disable Jeevan B
2026-04-16 8:28 ` Naladala, Ramanaidu
2026-04-16 3:53 ` [PATCH i-g-t v3 3/4] tests/intel/kms_psr_stress_test: Select PSR-capable output Jeevan B
2026-04-16 3:53 ` Jeevan B [this message]
2026-04-20 5:40 ` [PATCH i-g-t v3 4/4] tests/intel/kms_pm_dc: Scope PSR handling to output Samala, Pranay
2026-04-16 5:09 ` ✗ i915.CI.BAT: failure for Fix PSR handling for multi-eDP systems (rev4) Patchwork
2026-04-20 9:53 ` B, Jeevan
2026-04-16 5:48 ` ✓ Xe.CI.BAT: success " Patchwork
2026-04-16 8:51 ` ✗ Xe.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=20260416035333.69004-5-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