All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
To: igt-dev@lists.freedesktop.org
Subject: [igt-dev] [PATCH i-g-t 1/8] lib/i915/perf: add name checker for conversion
Date: Fri, 23 Apr 2021 10:44:37 +0300	[thread overview]
Message-ID: <20210423074444.175199-2-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20210423074444.175199-1-lionel.g.landwerlin@intel.com>

List all supported generations so we can fail sooner.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@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

_______________________________________________
igt-dev mailing list
igt-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/igt-dev

  reply	other threads:[~2021-04-23  7:44 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-04-23  7:44 [igt-dev] [PATCH i-g-t 0/8] lib/i915/perf: Small improvements Lionel Landwerlin
2021-04-23  7:44 ` Lionel Landwerlin [this message]
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 2/8] lib/i915/perf-configs: rename metric descriptions Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 3/8] lib/i915/perf-config: simplify converter script Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 4/8] lib/i915/perf-config: document devinfo fields Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 5/8] lib/i915/perf-config: don't forget to resolve single variable Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 6/8] lib/i915/perf-config: sanitize GT names Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 7/8] lib/i915/perf: have python scripts a custom_target input Lionel Landwerlin
2021-04-23  7:44 ` [igt-dev] [PATCH i-g-t 8/8] tools/i915-perf-recorder: print out oa format Lionel Landwerlin
2021-04-23  8:25 ` [igt-dev] ✓ Fi.CI.BAT: success for lib/i915/perf: Small improvements Patchwork
2021-04-23  9:33 ` [igt-dev] ✓ Fi.CI.IGT: " Patchwork
2021-05-18 20:07 ` [igt-dev] [PATCH i-g-t 0/8] " Umesh Nerlige Ramappa

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210423074444.175199-2-lionel.g.landwerlin@intel.com \
    --to=lionel.g.landwerlin@intel.com \
    --cc=igt-dev@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.