[PATCH i-g-t 2/3] Revert "tests/xe_oa: Drop TestOa from metric_set()"

Kamil Konieczny kamil.konieczny at linux.intel.com
Tue Dec 10 11:14:12 UTC 2024


Hi Ashutosh,
On 2024-12-09 at 18:08:11 -0800, Ashutosh Dixit wrote:
> This reverts commit d226604a63fbd5c37c9f5d60b6fc23acffc49f0a.
> 
> Re-instate TestOa metric set. IGT needs to work with TestOa since it has
> special properties which help with OA data validation. Remaining parts of
> d226604a63fb were already reverted in 4942fc57c20f ("lib/xe/oa: Re-instate
> TestOa metric sets in LNL/BMG XML's").
> 
> Signed-off-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

Reviewed-by: Kamil Konieczny <kamil.konieczny at linux.intel.com>

> ---
>  tests/intel/xe_oa.c | 23 +++++++++--------------
>  1 file changed, 9 insertions(+), 14 deletions(-)
> 
> diff --git a/tests/intel/xe_oa.c b/tests/intel/xe_oa.c
> index 9e7c2ae1e6..c660720ea0 100644
> --- a/tests/intel/xe_oa.c
> +++ b/tests/intel/xe_oa.c
> @@ -310,20 +310,15 @@ 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;
>  
> -	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");
> -	}
> +	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");
>  
>  	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.47.1
> 


More information about the igt-dev mailing list