[igt-dev] [PATCH i-g-t v3 01/16] i915/gem_engine_topology: Support gem_list_engines on platforms prior to MTL

Umesh Nerlige Ramappa umesh.nerlige.ramappa at intel.com
Fri May 19 15:46:35 UTC 2023


From: Ashutosh Dixit <ashutosh.dixit at intel.com>

gem_list_engines() should list engines correctly on platforms prior to
MTL. But at present it doesn't, it only supports MTL, and it skips on the
'igt_require(IS_METEORLAKE)' check for prior platforms. Fix this by
modifying gem_engine_to_gt_map() to return gt 0 for prior platforms,
because the only multi-gt platform supported at present in MTL.

Fixes: d2f39ce8186a ("lib/i915/gem_engine_topology: list engines specific to gt")
Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>
---
 lib/i915/gem_engine_topology.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/i915/gem_engine_topology.c b/lib/i915/gem_engine_topology.c
index 6c8929ec5..7c6cd9ba9 100644
--- a/lib/i915/gem_engine_topology.c
+++ b/lib/i915/gem_engine_topology.c
@@ -372,8 +372,12 @@ mtl_engine_to_gt_map(const struct i915_engine_class_instance *e)
 
 static int gem_engine_to_gt_map(int i915, const struct i915_engine_class_instance *engine)
 {
-	igt_require(IS_METEORLAKE(intel_get_drm_devid(i915)));
-	return mtl_engine_to_gt_map(engine);
+	uint32_t devid = intel_get_drm_devid(i915);
+
+	/* Only MTL multi-gt supported at present */
+	igt_require(intel_graphics_ver(devid) <= IP_VER(12, 70));
+
+	return IS_METEORLAKE(devid) ? mtl_engine_to_gt_map(engine) : 0;
 }
 
 /**
-- 
2.36.1



More information about the igt-dev mailing list