[PATCH i-g-t 2/2] lib/intel_batchbuffer: Fix igt_require in intel_bb_create_no_relocs

Dominik Karol Piątkowski dominik.karol.piatkowski at intel.com
Tue Sep 3 09:34:34 UTC 2024


gem_uses_full_ppgtt() calls gem_gtt_type(), that expects i915 drm
file descriptor. Wrap the igt_require in is_i915_device() check
to fix the issue.

Signed-off-by: Dominik Karol Piątkowski <dominik.karol.piatkowski at intel.com>
---
 lib/intel_batchbuffer.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/lib/intel_batchbuffer.c b/lib/intel_batchbuffer.c
index 72e2a5d38..93477661b 100644
--- a/lib/intel_batchbuffer.c
+++ b/lib/intel_batchbuffer.c
@@ -1234,7 +1234,8 @@ intel_bb_create_with_relocs_and_context(int fd, uint32_t ctx,
  */
 struct intel_bb *intel_bb_create_no_relocs(int fd, uint32_t size)
 {
-	igt_require(gem_uses_full_ppgtt(fd));
+	if (is_i915_device(fd))
+		igt_require(gem_uses_full_ppgtt(fd));
 
 	return __intel_bb_create(fd, 0, 0, NULL, size, false, 0, 0, 0,
 				 INTEL_ALLOCATOR_SIMPLE,
-- 
2.34.1



More information about the igt-dev mailing list