[PATCH i-g-t] tests/amdgpu/amd_cursor_overlay: reset primary position for reference frame
James Lin <[email protected]> Thu, 30 Jul 2026 20:57:32 +0800
| Newsgroups | org.freedesktop.lists.igt-dev |
|---|---|
| Message-ID | <[email protected]> |
[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 <[email protected]> --- 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