[PATCH i-g-t 1/2] tests/xe_eudebug: Set NEEDS_VISIBLE_VRAM for 'create_bind_list'

Christoph Manszewski christoph.manszewski at intel.com
Wed Dec 11 19:17:40 UTC 2024


The 'create_bind_list' function supports custom bo placement. Some subtests
like 'basic-vm-access' can request vram placement and use xe_bo_map
without setting the 'NEEDS_VISIBLE_VRAM' flag, which can result in a
segmentation fault. Enable the 'NEEDS_VISIBLE_VRAM' flag by default, since
the 'xe_bo_map' igt funtion unsets it automatically for non vram backed
bos.

Signed-off-by: Christoph Manszewski <christoph.manszewski at intel.com>
---
 tests/intel/xe_eudebug.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tests/intel/xe_eudebug.c b/tests/intel/xe_eudebug.c
index 39db16457..22b0da658 100644
--- a/tests/intel/xe_eudebug.c
+++ b/tests/intel/xe_eudebug.c
@@ -241,7 +241,8 @@ static union buf_id *vm_create_objects(int fd, uint32_t bo_placement, uint32_t v
 
 	for (i = 0; i < n; i++) {
 		if (bo_placement) {
-			bo[i].fd = xe_bo_create(fd, vm, size, bo_placement, 0);
+			bo[i].fd = xe_bo_create(fd, vm, size, bo_placement,
+						DRM_XE_GEM_CREATE_FLAG_NEEDS_VISIBLE_VRAM);
 			igt_assert(bo[i].fd);
 		} else {
 			bo[i].userptr = aligned_alloc(PAGE_SIZE, size);
-- 
2.34.1



More information about the igt-dev mailing list