All of lore.kernel.org
 help / color / mirror / Atom feed
* [igt-dev] [i-g-t] lib/gem_submission: Remove __gem_execbuf call
@ 2021-04-08  6:52 Tejas Upadhyay
  2021-04-08  9:33 ` Zbigniew Kempczyński
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Tejas Upadhyay @ 2021-04-08  6:52 UTC (permalink / raw)
  To: igt-dev; +Cc: hariom.pandey

After reloc support got dropped on GEN12/12+, lot of tests are
reporting failures which should be skipped using check
gem_has_relocations(). The problem is lot of those failures are
due to direct __gem_execbuf() call where we cant put gem_has_
relocations check to skip the test in case platform does not
support reason being it also calls __gem_execbuf which creates
never ending loop. Thus to avoid looping, call __gem_execbuf()
inside gem_has_relocations() is replaced with direct ioctl call.

Cc: Zbigniew Kempczyński <zbigniew.kempczynski@intel.com>
Signed-off-by: Tejas Upadhyay <tejaskumarx.surendrakumar.upadhyay@intel.com>
---
 lib/i915/gem_submission.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lib/i915/gem_submission.c b/lib/i915/gem_submission.c
index 051f9d04..50a8ae11 100644
--- a/lib/i915/gem_submission.c
+++ b/lib/i915/gem_submission.c
@@ -422,8 +422,14 @@ bool gem_has_relocations(int i915)
 		.buffer_count = 1,
 	};
 	bool has_relocs;
+	int err = 0;
+
+	if (igt_ioctl(i915, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf)) {
+		err = -errno;
+		igt_assume(err != 0);
+	}
 
-	has_relocs = __gem_execbuf(i915, &execbuf) == -ENOENT;
+	has_relocs = err == -ENOENT;
 	gem_close(i915, obj.handle);
 
 	return has_relocs;
-- 
2.30.0

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

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

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

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-08  6:52 [igt-dev] [i-g-t] lib/gem_submission: Remove __gem_execbuf call Tejas Upadhyay
2021-04-08  9:33 ` Zbigniew Kempczyński
2021-04-08  9:39   ` Surendrakumar Upadhyay, TejaskumarX
2021-04-08  9:44     ` Zbigniew Kempczyński
2021-04-08  9:59 ` [igt-dev] ✓ Fi.CI.BAT: success for " Patchwork
2021-04-08 11:57 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.