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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>

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

Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx>
Reported-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
---
 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

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx



[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux