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 3/8] lib/i915/perf-config: simplify converter script
Date: Fri, 23 Apr 2021 10:44:39 +0300	[thread overview]
Message-ID: <20210423074444.175199-4-lionel.g.landwerlin@intel.com> (raw)
In-Reply-To: <20210423074444.175199-1-lionel.g.landwerlin@intel.com>

Rather than having all GTs types, just rely on the chipset name to
find the set of registers that are relevant.

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
---
 lib/i915/perf-configs/mdapi-xml-convert.py | 24 +++++++++-------------
 1 file changed, 10 insertions(+), 14 deletions(-)

diff --git a/lib/i915/perf-configs/mdapi-xml-convert.py b/lib/i915/perf-configs/mdapi-xml-convert.py
index 7d9f35e4d..fab334919 100755
--- a/lib/i915/perf-configs/mdapi-xml-convert.py
+++ b/lib/i915/perf-configs/mdapi-xml-convert.py
@@ -111,20 +111,15 @@ chipsets = {
     },
     'BDW': gen8_11_chipset_params,
     'CHV': gen8_11_chipset_params,
-    'SKLGT2': gen8_11_chipset_params,
-    'SKLGT3': gen8_11_chipset_params,
-    'SKLGT4': gen8_11_chipset_params,
+    'SKL': gen8_11_chipset_params,
     'BXT': gen8_11_chipset_params,
-    'KBLGT2': gen8_11_chipset_params,
-    'KBLGT3': gen8_11_chipset_params,
+    'KBL': gen8_11_chipset_params,
     'GLK': gen8_11_chipset_params,
-    'CFLGT2': gen8_11_chipset_params,
-    'CFLGT3': gen8_11_chipset_params,
+    'CFL': gen8_11_chipset_params,
     'CNL': gen8_11_chipset_params,
     'ICL': gen8_11_chipset_params,
     'EHL': gen8_11_chipset_params,
-    'TGLGT1': gen8_11_chipset_params,
-    'TGLGT2': gen8_11_chipset_params,
+    'TGL': gen8_11_chipset_params,
     'RKL': gen8_11_chipset_params,
     'DG1': gen8_11_chipset_params,
     'ADL': gen8_11_chipset_params,
@@ -547,8 +542,9 @@ for arg in args.xml:
             continue
 
         chipset = oa_registry.Registry.chipset_name(mdapi_set.get('SupportedHW'))
+        chipset_fullname = chipset
         if concurrent_group.get('SupportedGT') != None:
-            chipset = chipset + concurrent_group.get('SupportedGT')
+            chipset_fullname = chipset_fullname + concurrent_group.get('SupportedGT')
         if chipset not in chipsets:
             print_err("WARNING: unsupported chipset {0}, consider updating {1}".format(chipset, __file__))
             continue
@@ -571,7 +567,7 @@ for arg in args.xml:
 
         set = et.SubElement(metrics, 'set')
 
-        set.set('chipset', chipset)
+        set.set('chipset', chipset_fullname)
 
         set.set('name', mdapi_set.get('ShortName'))
         set.set('symbol_name', set_symbol_name)
@@ -628,16 +624,16 @@ for arg in args.xml:
             add_register_config(set, 0, None, flex_regs, "FLEX")
 
         mdapi_hw_config_hash = oa_registry.Registry.mdapi_hw_config_hash(mdapi_set)
-        guid_hash = oa_registry.Registry.chipset_derive_hash(chipset.lower(),
+        guid_hash = oa_registry.Registry.chipset_derive_hash(chipset_fullname.lower(),
                                                              mdapi_hw_config_hash)
         hw_config_hash = oa_registry.Registry.hw_config_hash(set)
 
         if guid_hash in guids:
             set.set('hw_config_guid', guids[guid_hash])
         else:
-            print_err("WARNING: No GUID found for metric set " + chipset + ", " + set_symbol_name + " (SKIPPING)")
+            print_err("WARNING: No GUID found for metric set " + chipset_fullname + ", " + set_symbol_name + " (SKIPPING)")
             print_err("WARNING: If this is a new config add the following to guids.xml:")
-            print_err("<guid config_hash=\"" + hw_config_hash + "\" mdapi_config_hash=\"" + mdapi_hw_config_hash + "\" id=\"" + str(uuid.uuid4()) + "\" chipset=\"" + chipset.lower() + "\" name=\"" + set_symbol_name + "\" />")
+            print_err("<guid config_hash=\"" + hw_config_hash + "\" mdapi_config_hash=\"" + mdapi_hw_config_hash + "\" id=\"" + str(uuid.uuid4()) + "\" chipset=\"" + chipset_fullname.lower() + "\" name=\"" + set_symbol_name + "\" />")
             metrics.remove(set)
             continue
 
-- 
2.27.0

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

  parent 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 ` [igt-dev] [PATCH i-g-t 1/8] lib/i915/perf: add name checker for conversion Lionel Landwerlin
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 ` Lionel Landwerlin [this message]
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-4-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.