summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lin <PingLei.Lin@amd.com>2026-07-30 20:57:32 +0800
committerAlex Hung <alex.hung@amd.com>2026-08-05 18:53:27 -0600
commit7dc38c5c2d70a6ca66b126851628e2fb9e9254f7 (patch)
tree1aa56fd9ba0d929c9ae64e87d8e9fa0df6e07e7c
parent92d4ac76dbed8f47dd4b653372ed5cebcfd0ea22 (diff)
tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame
[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> Reviewed-by: Tom Chung <chiahsuan.chung@amd.com>
-rw-r--r--tests/amdgpu/amd_cursor_overlay.c1
1 files changed, 1 insertions, 0 deletions
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);