From: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
To: igt-dev@lists.freedesktop.org
Cc: Ashutosh Dixit <ashutosh.dixit@intel.com>
Subject: [PATCH i-g-t] lib/i915/perf: Add ARL support in IGT perf library
Date: Wed, 3 Jul 2024 15:44:05 -0700 [thread overview]
Message-ID: <20240703224405.3172164-1-umesh.nerlige.ramappa@intel.com> (raw)
Add ARL PCI ids for ARL in IGT perf library.
Resolves: https://gitlab.freedesktop.org/drm/i915/kernel/-/issues/11356
Signed-off-by: Umesh Nerlige Ramappa <umesh.nerlige.ramappa@intel.com>
---
lib/i915/perf.c | 32 ++++++++++++++++++++++++++++++++
lib/i915_pciids_local.h | 18 ++++++++++++++++++
2 files changed, 50 insertions(+)
diff --git a/lib/i915/perf.c b/lib/i915/perf.c
index ee950b3c0..ef2f74be8 100644
--- a/lib/i915/perf.c
+++ b/lib/i915/perf.c
@@ -230,6 +230,34 @@ is_mtl_gt3(const struct intel_perf_devinfo *devinfo)
return false;
}
+static bool
+is_arl_gt1(const struct intel_perf_devinfo *devinfo)
+{
+ static const uint32_t devids[] = {
+ INTEL_ARL_GT1_IDS(ID),
+ };
+ for (uint32_t i = 0; i < ARRAY_SIZE(devids); i++) {
+ if (devids[i] == devinfo->devid)
+ return true;
+ }
+
+ return false;
+}
+
+static bool
+is_arl_gt2(const struct intel_perf_devinfo *devinfo)
+{
+ static const uint32_t devids[] = {
+ INTEL_ARL_GT2_IDS(ID),
+ };
+ for (uint32_t i = 0; i < ARRAY_SIZE(devids); i++) {
+ if (devids[i] == devinfo->devid)
+ return true;
+ }
+
+ return false;
+}
+
struct intel_perf *
intel_perf_for_devinfo(uint32_t device_id,
uint32_t revision,
@@ -432,6 +460,10 @@ intel_perf_for_devinfo(uint32_t device_id,
intel_perf_load_metrics_mtlgt2(perf);
else if (is_mtl_gt3(&perf->devinfo))
intel_perf_load_metrics_mtlgt3(perf);
+ else if (is_arl_gt1(&perf->devinfo))
+ intel_perf_load_metrics_mtlgt2(perf);
+ else if (is_arl_gt2(&perf->devinfo))
+ intel_perf_load_metrics_mtlgt3(perf);
else
return unsupported_i915_perf_platform(perf);
} else {
diff --git a/lib/i915_pciids_local.h b/lib/i915_pciids_local.h
index 92879704a..c404a51af 100644
--- a/lib/i915_pciids_local.h
+++ b/lib/i915_pciids_local.h
@@ -31,6 +31,24 @@
INTEL_MTL_P_GT3_IDS(MACRO__, ## __VA_ARGS__)
#endif
+#ifndef INTEL_ARL_GT1_IDS
+#define INTEL_ARL_GT1_IDS(MACRO__, ...) \
+ MACRO__(0x7D41, ## __VA_ARGS__), \
+ MACRO__(0x7D67, ## __VA_ARGS__)
+#endif
+
+#ifndef INTEL_ARL_GT2_IDS
+#define INTEL_ARL_GT2_IDS(MACRO__, ...) \
+ MACRO__(0x7D51, ## __VA_ARGS__), \
+ MACRO__(0x7DD1, ## __VA_ARGS__)
+#endif
+
+#ifndef INTEL_ARL_IDS
+#define INTEL_ARL_IDS(MACRO__, ...) \
+ INTEL_ARL_GT1_IDS(MACRO__, ## __VA_ARGS__), \
+ INTEL_ARL_GT2_IDS(MACRO__, ## __VA_ARGS__)
+#endif
+
/* PVC */
#ifndef INTEL_PVC_IDS
#define INTEL_PVC_IDS(MACRO__, ...) \
--
2.38.1
next reply other threads:[~2024-07-03 22:44 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-07-03 22:44 Umesh Nerlige Ramappa [this message]
2024-07-03 23:09 ` ✗ Fi.CI.BUILD: failure for lib/i915/perf: Add ARL support in IGT perf library Patchwork
2024-07-04 16:14 ` ✓ CI.xeBAT: success for lib/i915/perf: Add ARL support in IGT perf library (rev2) Patchwork
2024-07-04 16:22 ` ✓ Fi.CI.BAT: " Patchwork
2024-07-04 19:12 ` [PATCH i-g-t] lib/i915/perf: Add ARL support in IGT perf library Dixit, Ashutosh
2024-07-08 17:54 ` Umesh Nerlige Ramappa
2024-07-04 20:09 ` ✗ CI.xeFULL: failure for lib/i915/perf: Add ARL support in IGT perf library (rev2) Patchwork
2024-07-05 7:27 ` ✗ Fi.CI.IGT: " Patchwork
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=20240703224405.3172164-1-umesh.nerlige.ramappa@intel.com \
--to=umesh.nerlige.ramappa@intel.com \
--cc=ashutosh.dixit@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox