[igt-dev] [PATCH i-g-t 1/8] lib/i915/perf: add name checker for conversion

Lionel Landwerlin lionel.g.landwerlin at intel.com
Fri Apr 23 07:44:37 UTC 2021


List all supported generations so we can fail sooner.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin at intel.com>
---
 lib/i915/perf-configs/mdapi-xml-convert.py |  2 +-
 lib/i915/perf-configs/oa_guid_registry.py  | 23 ++++++++++++++++++++++
 lib/i915/perf-configs/update-guids.py      |  2 +-
 3 files changed, 25 insertions(+), 2 deletions(-)

diff --git a/lib/i915/perf-configs/mdapi-xml-convert.py b/lib/i915/perf-configs/mdapi-xml-convert.py
index b184a6385..7d9f35e4d 100755
--- a/lib/i915/perf-configs/mdapi-xml-convert.py
+++ b/lib/i915/perf-configs/mdapi-xml-convert.py
@@ -546,7 +546,7 @@ for arg in args.xml:
             print_err("WARNING: duplicate set named \"" + set_symbol_name + "\" (SKIPPING)")
             continue
 
-        chipset = mdapi_set.get('SupportedHW')
+        chipset = oa_registry.Registry.chipset_name(mdapi_set.get('SupportedHW'))
         if concurrent_group.get('SupportedGT') != None:
             chipset = chipset + concurrent_group.get('SupportedGT')
         if chipset not in chipsets:
diff --git a/lib/i915/perf-configs/oa_guid_registry.py b/lib/i915/perf-configs/oa_guid_registry.py
index 2df6bdfb3..e40c9fe09 100644
--- a/lib/i915/perf-configs/oa_guid_registry.py
+++ b/lib/i915/perf-configs/oa_guid_registry.py
@@ -81,3 +81,26 @@ class Registry:
         """
 
         return "%s-%s" % (chipset, hash)
+
+
+    @staticmethod
+    def chipset_name(name):
+        known_chipsets = ( 'HSW',
+                           'BDW',
+                           'CHV',
+                           'SKL',
+                           'BXT',
+                           'KBL',
+                           'GLK',
+                           'CFL',
+                           'CNL',
+                           'ICL',
+                           'EHL',
+                           'TGL',
+                           'RKL',
+                           'DG1' )
+        if name in known_chipsets:
+            return name
+
+        # Unknown HW
+        assert 0
diff --git a/lib/i915/perf-configs/update-guids.py b/lib/i915/perf-configs/update-guids.py
index 4a9392171..16764f5bd 100755
--- a/lib/i915/perf-configs/update-guids.py
+++ b/lib/i915/perf-configs/update-guids.py
@@ -126,7 +126,7 @@ for arg in args.xml:
 
         mdapi_config_hash = oa_registry.Registry.mdapi_hw_config_hash(mdapi_set)
 
-        chipset = mdapi_set.get('SupportedHW').lower()
+        chipset = oa_registry.Registry.chipset_name(mdapi_set.get('SupportedHW')).lower()
         if concurrent_group.get('SupportedGT') != None:
             chipset = chipset + concurrent_group.get('SupportedGT').lower()
 
-- 
2.27.0



More information about the igt-dev mailing list