[igt-dev] [PATCH i-g-t 07/20] tests/i915/perf: Fix i915_perf_revision for use with xe

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


Because xe driver is based on the latest upstream i915, set the perf
revision for xe to be greater than the latest i915 perf revision. Doing so
ensures that all tests for latest i915 features are also available for xe.

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 9fb11f9e0730..03af968d9484 100644
--- a/tests/i915/perf.c
+++ b/tests/i915/perf.c
@@ -564,6 +564,12 @@ static int i915_perf_revision(int fd)
 	drm_i915_getparam_t gp;
 	int value = 1, ret;
 
+#define FINAL_I915_PERF_REV 7
+
+	if (is_xe_device(drm_fd))
+		return FINAL_I915_PERF_REV +
+			xe_config(drm_fd)->info[XE_QUERY_OA_IOCTL_VERSION];
+
 	gp.param = I915_PARAM_PERF_REVISION;
 	gp.value = &value;
 	ret = igt_ioctl(drm_fd, DRM_IOCTL_I915_GETPARAM, &gp);
-- 
2.41.0



More information about the igt-dev mailing list