Skip to contentSkip to conversation

tests/i915/gem_exec_nop:-Fixed Crash issue seen on few platform

PATCH Superseded Arjun Melkaveri 1 participant 1 message Mar 27, 2020

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tests/i915/gem_exec_nop:-Fixed Crash issue seen on few platform

Crash issue was seen w.r.t engines on different platforms. Fixed this by initializing engine and engine name with maximum supported engines value.

---
 tests/i915/gem_exec_nop.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
tests/i915/gem_exec_nop.c +4 -2
index 6da6234f..a8c18b5d 100644
@@ -55,6 +55,7 @@
 
 #define MAX_PRIO LOCAL_I915_CONTEXT_MAX_USER_PRIORITY
 #define MIN_PRIO LOCAL_I915_CONTEXT_MIN_USER_PRIORITY
+#define GEM_MAX_ENGINES I915_EXEC_RING_MASK + 1
 
 #define FORKED 1
 #define CHAINED 2
@@ -435,14 +436,15 @@ static void parallel(int fd, uint32_t handle, int timeout)
 	const struct intel_execution_engine2 *e;
 	struct drm_i915_gem_execbuffer2 execbuf;
 	struct drm_i915_gem_exec_object2 obj;
-	unsigned engines[16];
-	char *names[16];
+	unsigned engines[GEM_MAX_ENGINES];
+	char *names[GEM_MAX_ENGINES];
 	unsigned nengine;
 	unsigned long count;
 	double time, sum;
 
 	sum = 0;
 	nengine = 0;
+
 	__for_each_physical_engine(fd, e) {
 		engines[nengine] = e->flags;
 		names[nengine++] = strdup(e->name);
Signature · 6 lines
2.25.1

_______________________________________________
igt-dev mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/igt-dev