[igt-dev] [PATCH i-g-t 2/2] i915/gem_engine_topology: Fix virtual engine check

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Jan 22 15:23:49 UTC 2020


From: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Engine class/instance have to be u16 for the virtual engine check to work.

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
Reported-by: Chris Wilson <chris at chris-wilson.co.uk>
---
 lib/i915/gem_engine_topology.c | 2 +-
 lib/igt_gt.h                   | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index c3645eab8538..989a6e26d6ef 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -105,7 +105,7 @@ static const char *class_names[] = {
 };
 
 static void init_engine(struct intel_execution_engine2 *e2,
-			int class, int instance, uint64_t flags)
+			uint16_t class, uint16_t instance, uint64_t flags)
 {
 	int ret;
 
diff --git a/lib/igt_gt.h b/lib/igt_gt.h
index 6a8eceb68817..e880cd4ed11f 100644
--- a/lib/igt_gt.h
+++ b/lib/igt_gt.h
@@ -96,8 +96,8 @@ bool gem_class_can_store_dword(int fd, int class);
 
 extern const struct intel_execution_engine2 {
 	char name[16];
-	int class;
-	int instance;
+	uint16_t class;
+	uint16_t instance;
 	uint64_t flags;
 	bool is_virtual;
 } intel_execution_engines2[];
-- 
2.20.1



More information about the igt-dev mailing list