From: James Lin <PingLei.Lin@amd.com>
To: <igt-dev@lists.freedesktop.org>
Cc: <alex.hung@amd.com>, <sunpeng.li@amd.com>,
<chiahsuan.chung@amd.com>, <Pinglei.lin@amd.com>,
James Lin <PingLei.Lin@amd.com>
Subject: [PATCH i-g-t] tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame
Date: Thu, 30 Jul 2026 20:57:32 +0800 [thread overview]
Message-ID: <20260730125740.110354-1-PingLei.Lin@amd.com> (raw)
[Why]
test_cursor_pos() reuses the primary plane across cursor positions. The
TEST_QUARTER_FB path repositions the primary to an opposite quarter of the
screen (opp_x, opp_y). On the next iteration the reference frame reprograms
the full-size framebuffer with igt_plane_set_fb(), which resets the plane
size but NOT its CRTC position, so the "full-screen" reference primary keeps
the stale quarter offset and therefore no longer covers the CRTC.
On DCN4x the cursor falls back to overlay mode whenever the top plane does
not fill the CRTC. With the stale offset the reference frame is composited
with an overlay cursor instead of a native one, which renders differently
from the settled frame and produces a stable CRC mismatch against the test
frame (only the first position, where the primary is still at the origin,
happens to pass).
[How]
Explicitly reset the primary plane position to (0,0) for the reference
frame so it actually covers the CRTC, matching the test's intent.
Signed-off-by: James Lin <PingLei.Lin@amd.com>
---
tests/amdgpu/amd_cursor_overlay.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/tests/amdgpu/amd_cursor_overlay.c b/tests/amdgpu/amd_cursor_overlay.c
index 41c9905b8..b130da4ff 100644
--- a/tests/amdgpu/amd_cursor_overlay.c
+++ b/tests/amdgpu/amd_cursor_overlay.c
@@ -214,6 +214,7 @@ static void test_cursor_pos(data_t *data, int x, int y, unsigned int flags)
cr = igt_get_cairo_ctx(rgb_fb->fd, rgb_fb);
igt_plane_set_fb(data->primary, rgb_fb);
+ igt_plane_set_position(data->primary, 0, 0);
igt_display_commit2(&data->display, COMMIT_ATOMIC);
igt_paint_color(cr, 0, 0, rgb_fb->width, rgb_fb->height, 0.0, 0.0, 0.0);
--
2.43.0
next reply other threads:[~2026-07-31 7:16 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-30 12:57 James Lin [this message]
2026-07-31 8:08 ` ✓ Xe.CI.BAT: success for tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame Patchwork
2026-07-31 8:29 ` ✗ i915.CI.BAT: failure " Patchwork
2026-07-31 9:37 ` ✓ Xe.CI.FULL: success " 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=20260730125740.110354-1-PingLei.Lin@amd.com \
--to=pinglei.lin@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