diff options
author | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-04-21 07:51:14 +0200 |
---|---|---|
committer | Zbigniew Kempczyński <zbigniew.kempczynski@intel.com> | 2021-08-10 21:02:50 +0200 |
commit | 7311d36f32230be8d8277d0a0b34b76bfc49ddcb (patch) | |
tree | 24f4b2e9f9ccfbf6678c2997c717d8f2bb376b92 /tests/kms_cursor_legacy.c | |
parent | c017ede4b32177de7489f58cf0f1e3290b342d9f (diff) |
tests/kms_cursor_legacy: Adopt to use allocator
For newer gens we're not able to rely on relocations. Adopt to use
offsets acquired from the allocator.
v2: Don't query i915 for relocations on AMD devices (Rodrigo)
Signed-off-by: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Cc: Petri Latvala <petri.latvala@intel.com>
Cc: Rodrigo Siqueira <Rodrigo.Siqueira@amd.com>
Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>
Diffstat (limited to 'tests/kms_cursor_legacy.c')
-rw-r--r-- | tests/kms_cursor_legacy.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c index 75a822c4..0f0df951 100644 --- a/tests/kms_cursor_legacy.c +++ b/tests/kms_cursor_legacy.c @@ -517,6 +517,7 @@ static void basic_flip_cursor(igt_display_t *display, struct igt_fb fb_info, cursor_fb, cursor_fb2, argb_fb; unsigned vblank_start; enum pipe pipe = find_connected_pipe(display, false); + uint64_t ahnd = (flags & BASIC_BUSY) ? get_reloc_ahnd(display->drm_fd, 0) : 0; igt_spin_t *spin; int i, miss1 = 0, miss2 = 0, delta; @@ -548,6 +549,7 @@ static void basic_flip_cursor(igt_display_t *display, spin = NULL; if (flags & BASIC_BUSY) spin = igt_spin_new(display->drm_fd, + .ahnd = ahnd, .dependency = fb_info.gem_handle); /* Start with a synchronous query to align with the vblank */ @@ -631,6 +633,7 @@ static void basic_flip_cursor(igt_display_t *display, igt_remove_fb(display->drm_fd, &argb_fb); if (cursor_fb2.gem_handle) igt_remove_fb(display->drm_fd, &cursor_fb2); + put_ahnd(ahnd); } static int @@ -1319,6 +1322,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic) igt_pipe_t *pipe_connected = &display->pipes[pipe]; igt_plane_t *plane_primary = igt_pipe_get_plane_type(pipe_connected, DRM_PLANE_TYPE_PRIMARY); igt_crc_t crcs[2], test_crc; + uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0); if (atomic) igt_require(display->is_atomic); @@ -1366,6 +1370,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic) igt_spin_t *spin; spin = igt_spin_new(display->drm_fd, + .ahnd = ahnd, .dependency = fb_info[1].gem_handle); vblank_start = kmstest_get_vblank(display->drm_fd, pipe, DRM_VBLANK_NEXTONMISS); @@ -1394,6 +1399,7 @@ static void flip_vs_cursor_busy_crc(igt_display_t *display, bool atomic) igt_remove_fb(display->drm_fd, &fb_info[1]); igt_remove_fb(display->drm_fd, &fb_info[0]); igt_remove_fb(display->drm_fd, &cursor_fb); + put_ahnd(ahnd); } igt_main |