[igt-dev] [PATCH i-g-t 14/20] tests/i915/perf: Fix has_class_instance for xe

Ashutosh Dixit ashutosh.dixit at intel.com
Tue Aug 8 01:00:11 UTC 2023


PMU is not available for xe so implement has_class_instance for xe without
PMU.

Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
---
 tests/i915/perf.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/tests/i915/perf.c b/tests/i915/perf.c
index 78e68462ad06..df6cb7edd017 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -5816,6 +5816,12 @@ static bool has_class_instance(int i915, uint16_t class, uint16_t instance)
 {
 	int fd;
 
+	if (is_xe_device(drm_fd)) {
+		if (class == I915_ENGINE_CLASS_RENDER && !IS_PONTEVECCHIO(devid))
+			return true;
+		return false;
+	}
+
 	fd = perf_i915_open(i915, I915_PMU_ENGINE_BUSY(class, instance));
 	if (fd >= 0) {
 		close(fd);
-- 
2.41.0



More information about the igt-dev mailing list