[igt-dev] [PATCH i-g-t v2] tests/i915/gem_exec_nop: Update poll sequential

priyanka.dandamudi at intel.com priyanka.dandamudi at intel.com
Wed Oct 6 09:54:07 UTC 2021


From: Priyanka Dandamudi <priyanka.dandamudi at intel.com>

set_caching ioctl will get skipped for discrete
and mmap__cpu gets used by default.

Signed-off-by: Priyanka Dandamudi <priyanka.dandamudi at intel.com>
Cc: Matthew Auld <matthew.auld at intel.com>
---
 tests/i915/gem_exec_nop.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/tests/i915/gem_exec_nop.c b/tests/i915/gem_exec_nop.c
index 03adc9ee..5ea815f6 100644
--- a/tests/i915/gem_exec_nop.c
+++ b/tests/i915/gem_exec_nop.c
@@ -238,6 +238,7 @@ static void poll_sequential(int fd, const intel_ctx_t *ctx,
 		flags |= I915_EXEC_SECURE;
 
 	nengine = 0;
+	cached = true;
 	for_each_ctx_engine(fd, ctx, e) {
 		if (!gem_class_can_store_dword(fd, e->class) ||
 		    !gem_class_has_mutable_submission(fd, e->class))
@@ -251,7 +252,8 @@ static void poll_sequential(int fd, const intel_ctx_t *ctx,
 	memset(obj, 0, sizeof(obj));
 	obj[0].handle = gem_create(fd, 4096);
 	obj[0].flags = EXEC_OBJECT_WRITE;
-	cached = __gem_set_caching(fd, obj[0].handle, 1) == 0;
+	if(!gem_has_lmem(fd))
+		cached = __gem_set_caching(fd, obj[0].handle, 1) == 0;
 	obj[1].handle = gem_create(fd, 4096);
 	obj[1].relocs_ptr = to_user_pointer(reloc);
 	obj[1].relocation_count = ARRAY_SIZE(reloc);
-- 
2.25.1



More information about the igt-dev mailing list