Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [PATCH] tests/kms_cursor_legacy: Use igt_require_intel before get_reloc_ahnd
@ 2021-11-01 16:58 Mark Yacoub
  2021-11-01 17:18 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: Mark Yacoub @ 2021-11-01 16:58 UTC (permalink / raw)
  To: igt-dev
  Cc: chunkuang.hu, petri.latvala, seanpaul, p.zabel, matthias.bgg,
	Mark Yacoub

From: Mark Yacoub <markyacoub@google.com>

[Why]
get_reloc_ahnd uses the intel allocator, which is not supported on
non-intel devices.

[How]
Call igt_require_intel before any call to get_reloc_ahnd.

Test: igt@kms_cursor_legacy@flip-vs-cursor-busy-crc-{atomic,legacy} on
ChromeOS Jacuzzi (MTK)

Signed-off-by: Mark Yacoub <markyacoub@chromium.org>
---
 tests/kms_cursor_legacy.c | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/tests/kms_cursor_legacy.c b/tests/kms_cursor_legacy.c
index 81362807..e48cdf6c 100644
--- a/tests/kms_cursor_legacy.c
+++ b/tests/kms_cursor_legacy.c
@@ -522,10 +522,16 @@ 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;
+	uint64_t ahnd = 0;
 	igt_spin_t *spin;
 	int i, miss1 = 0, miss2 = 0, delta;
 
+	if (flags & BASIC_BUSY)
+	{
+		igt_require_intel(display->drm_fd);
+		ahnd = get_reloc_ahnd(display->drm_fd, 0);
+	}
+
 	if (mode >= flip_test_atomic)
 		igt_require(display->is_atomic);
 
@@ -1327,6 +1333,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;
+	igt_require_intel(display->drm_fd);
 	uint64_t ahnd = get_reloc_ahnd(display->drm_fd, 0);
 
 	if (atomic)
-- 
2.33.1.1089.g2158813163f-goog

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

end of thread, other threads:[~2021-11-04  1:43 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-11-01 16:58 [igt-dev] [PATCH] tests/kms_cursor_legacy: Use igt_require_intel before get_reloc_ahnd Mark Yacoub
2021-11-01 17:18 ` [igt-dev] ✗ GitLab.Pipeline: warning for " Patchwork
2021-11-01 17:43 ` [igt-dev] ✓ Fi.CI.BAT: success " Patchwork
2021-11-01 19:00 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-11-03 10:25 ` [igt-dev] [PATCH] " Petri Latvala
2021-11-04  1:42   ` Dixit, Ashutosh

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