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

Zbigniew Kempczyński zbigniew.kempczynski at intel.com
Tue Aug 8 06:35:08 UTC 2023


On Mon, Aug 07, 2023 at 06:00:11PM -0700, Ashutosh Dixit wrote:
> 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(+)
> 

I reviewed this likely in reversed order - I mean "Temporarily skip
render_copy for xe" before this so if PMU is currently not available
for xe it makes sense to disable it temporarily. Anyway some comment
would be highly welcome before the condition.

--
Zbigniew

> 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