[PATCH i-g-t 1/4] tests/xe_oa: Drop TestOa from metric_set()

Ashutosh Dixit ashutosh.dixit at intel.com
Thu Sep 5 16:44:55 UTC 2024


From: José Roberto de Souza <jose.souza at intel.com>

Some platforms don't provide TestOa and Renderbasic and ComputeBasic
are better tests for render and compute engine and available in all
platforms.

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
 tests/intel/xe_oa.c | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
index f2c6d53007..aae9be2c40 100644
--- a/tests/intel/xe_oa.c
+++ b/tests/intel/xe_oa.c
@@ -311,15 +311,20 @@ static struct intel_xe_perf_metric_set *metric_set(const struct drm_xe_engine_cl
 	struct intel_xe_perf_metric_set *metric_set_iter;
 	struct intel_xe_perf_metric_set *test_set = NULL;
 
-	if (hwe->engine_class == DRM_XE_ENGINE_CLASS_RENDER ||
-	    hwe->engine_class == DRM_XE_ENGINE_CLASS_COMPUTE)
-		test_set_name = "TestOa";
-	else if ((hwe->engine_class == DRM_XE_ENGINE_CLASS_VIDEO_DECODE ||
-		  hwe->engine_class == DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE) &&
-		 HAS_OAM(devid))
-		test_set_name = "MediaSet1";
-	else
-		igt_assert(!"reached");
+	switch (hwe->engine_class) {
+	case DRM_XE_ENGINE_CLASS_RENDER:
+		test_set_name = "RenderBasic";
+		break;
+	case DRM_XE_ENGINE_CLASS_COMPUTE:
+		test_set_name = "ComputeBasic";
+		break;
+	case DRM_XE_ENGINE_CLASS_VIDEO_DECODE:
+	case DRM_XE_ENGINE_CLASS_VIDEO_ENHANCE:
+		if (HAS_OAM(devid))
+			test_set_name = "MediaSet1";
+	default:
+		igt_assert(!"missing");
+	}
 
 	igt_list_for_each_entry(metric_set_iter, &intel_xe_perf->metric_sets, link) {
 		if (strcmp(metric_set_iter->symbol_name, test_set_name) == 0) {
-- 
2.41.0



More information about the igt-dev mailing list