Igt-dev Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH i-g-t] lib/i915/perf: Add ARL support in IGT perf library
@ 2024-07-03 22:44 Umesh Nerlige Ramappa
  2024-07-03 23:09 ` ✗ Fi.CI.BUILD: failure for " Patchwork
                   ` (5 more replies)
  0 siblings, 6 replies; 8+ messages in thread
From: Umesh Nerlige Ramappa @ 2024-07-03 22:44 UTC (permalink / raw)
  To: igt-dev; +Cc: Ashutosh Dixit

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


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-07-08 17:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-03 22:44 [PATCH i-g-t] lib/i915/perf: Add ARL support in IGT perf library Umesh Nerlige Ramappa
2024-07-03 23:09 ` ✗ Fi.CI.BUILD: failure for " 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox