From: Ray Wu <ray.wu@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <alex.hung@amd.com>, <sunpeng.li@amd.com>,
<chiahsuan.chung@amd.com>, <ray.wu@amd.com>
Subject: [PATCH i-g-t 2/2] tests/kms_cursor_legacy: disable AMD Panel Replay during test
Date: Tue, 2 Jun 2026 14:41:22 +0800 [thread overview]
Message-ID: <20260602064543.58586-3-ray.wu@amd.com> (raw)
In-Reply-To: <20260602064543.58586-1-ray.wu@amd.com>
[Why]
On AMD, cursor updates can occasionally be delayed when Panel
Replay is active, causing intermittent timeouts in the cursor
legacy subtests.
[How]
Call igt_amd_disallow_replay_on_all_edp() in the setup fixture to
disable Panel Replay entry on any eDP that currently has it
enabled, and restore it in the teardown fixture.
Signed-off-by: Ray Wu <ray.wu@amd.com>
---
tests/kms_cursor_legacy.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 4d597af79..62339855e 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -35,6 +35,7 @@
#include "i915/gem.h"
#include "igt.h"
+#include "igt_amd.h"
#include "igt_psr.h"
#include "igt_rand.h"
#include "igt_stats.h"
@@ -1875,6 +1876,7 @@ int igt_main()
const int ncpus = sysconf(_SC_NPROCESSORS_ONLN);
igt_display_t display = { .drm_fd = -1 };
bool intel_psr2_restore = false;
+ bool amd_replay_restore = false;
int i;
const char *modes[flip_test_last+1] = {
"legacy",
@@ -1898,6 +1900,14 @@ int igt_main()
*/
intel_psr2_restore = i915_psr2_sel_fetch_to_psr1(display.drm_fd, NULL);
+ /*
+ * On AMD, when Panel Replay is enabled the HW cannot guarantee
+ * that all required cursor updates land within a single vblank,
+ * so disable Panel Replay (if any eDP output has it on) for the
+ * duration of this test and restore it on teardown.
+ */
+ amd_replay_restore = igt_amd_disallow_replay_on_all_edp(display.drm_fd, &display, true);
+
igt_install_exit_handler(igt_drm_debug_mask_reset_exit_handler);
update_debug_mask_if_ci(debug_mask_if_ci);
}
@@ -2128,6 +2138,8 @@ int igt_main()
}
igt_fixture() {
+ if (amd_replay_restore)
+ igt_amd_disallow_replay_on_all_edp(display.drm_fd, &display, false);
if (intel_psr2_restore)
i915_psr2_sel_fetch_restore(display.drm_fd, NULL);
igt_display_fini(&display);
--
2.43.0
next prev parent reply other threads:[~2026-06-02 6:46 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-02 6:41 [PATCH i-g-t 0/2] kms_cursor_legacy: avoid AMD Panel Replay interference Ray Wu
2026-06-02 6:41 ` [PATCH i-g-t 1/2] lib/igt_amd: add helper to disable Panel Replay on all eDPs Ray Wu
2026-06-04 2:30 ` Tom Chung
2026-06-02 6:41 ` Ray Wu [this message]
2026-06-04 2:31 ` [PATCH i-g-t 2/2] tests/kms_cursor_legacy: disable AMD Panel Replay during test Tom Chung
2026-06-02 7:47 ` ✓ Xe.CI.BAT: success for kms_cursor_legacy: avoid AMD Panel Replay interference Patchwork
2026-06-02 8:07 ` ✓ i915.CI.BAT: " Patchwork
2026-06-02 14:07 ` ✗ i915.CI.Full: failure " Patchwork
2026-06-02 14:44 ` ✗ Xe.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=20260602064543.58586-3-ray.wu@amd.com \
--to=ray.wu@amd.com \
--cc=alex.hung@amd.com \
--cc=chiahsuan.chung@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