Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame
@ 2026-07-30 12:57 James Lin
  2026-07-31  8:08 ` ✓ Xe.CI.BAT: success for " Patchwork
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: James Lin @ 2026-07-30 12:57 UTC (permalink / raw)
  To: igt-dev; +Cc: alex.hung, sunpeng.li, chiahsuan.chung, Pinglei.lin, James Lin

[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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-07-31  9:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-30 12:57 [PATCH i-g-t] tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame James Lin
2026-07-31  8:08 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-07-31  8:29 ` ✗ i915.CI.BAT: failure " Patchwork
2026-07-31  9:37 ` ✓ Xe.CI.FULL: success " Patchwork

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox