[igt-dev] [PATCH i-g-t 6/8] lib/i915/perf-config: sanitize GT names
Lionel Landwerlin
lionel.g.landwerlin at intel.com
Fri Apr 23 07:44:42 UTC 2021
Make sure we don't have any space in there.
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 | 6 ++++++
lib/i915/perf-configs/update-guids.py | 2 +-
3 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/lib/i915/perf-configs/mdapi-xml-convert.py b/lib/i915/perf-configs/mdapi-xml-convert.py
index fab334919..d26ff623e 100755
--- a/lib/i915/perf-configs/mdapi-xml-convert.py
+++ b/lib/i915/perf-configs/mdapi-xml-convert.py
@@ -544,7 +544,7 @@ for arg in args.xml:
chipset = oa_registry.Registry.chipset_name(mdapi_set.get('SupportedHW'))
chipset_fullname = chipset
if concurrent_group.get('SupportedGT') != None:
- chipset_fullname = chipset_fullname + concurrent_group.get('SupportedGT')
+ chipset_fullname = chipset_fullname + oa_registry.Registry.gt_name(concurrent_group.get('SupportedGT'))
if chipset not in chipsets:
print_err("WARNING: unsupported chipset {0}, consider updating {1}".format(chipset, __file__))
continue
diff --git a/lib/i915/perf-configs/oa_guid_registry.py b/lib/i915/perf-configs/oa_guid_registry.py
index e40c9fe09..1e082ddfd 100644
--- a/lib/i915/perf-configs/oa_guid_registry.py
+++ b/lib/i915/perf-configs/oa_guid_registry.py
@@ -1,6 +1,7 @@
import copy
import hashlib
+import re
import xml.etree.ElementTree as et
@@ -104,3 +105,8 @@ class Registry:
# Unknown HW
assert 0
+
+
+ @staticmethod
+ def gt_name(name):
+ return re.sub(' ', '', name)
diff --git a/lib/i915/perf-configs/update-guids.py b/lib/i915/perf-configs/update-guids.py
index 16764f5bd..d38a7a955 100755
--- a/lib/i915/perf-configs/update-guids.py
+++ b/lib/i915/perf-configs/update-guids.py
@@ -128,7 +128,7 @@ for arg in args.xml:
chipset = oa_registry.Registry.chipset_name(mdapi_set.get('SupportedHW')).lower()
if concurrent_group.get('SupportedGT') != None:
- chipset = chipset + concurrent_group.get('SupportedGT').lower()
+ chipset = chipset + oa_registry.Registry.gt_name(concurrent_group.get('SupportedGT')).lower()
set_name = mdapi_set.get('SymbolName')
--
2.27.0
More information about the igt-dev
mailing list