[Intel-gfx] [PATCH igt 2/3] igt/perf_pmu: Test for supported perf before starting test_interrupts

Tvrtko Ursulin tvrtko.ursulin at linux.intel.com
Wed Nov 22 20:06:38 UTC 2017


On 22/11/2017 18:05, Chris Wilson wrote:
> Check for the perf event prior to calibrating the nop batch, so that we
> don't spend 4.5s before skipping.
> 
> Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>
> Cc: Tvrtko Ursulin <tvrtko.ursulin at intel.com>
> ---
>   tests/perf_pmu.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/tests/perf_pmu.c b/tests/perf_pmu.c
> index 420eb6c9..dd7a1761 100644
> --- a/tests/perf_pmu.c
> +++ b/tests/perf_pmu.c
> @@ -898,11 +898,11 @@ test_interrupts(int gem_fd)
>   	unsigned int i;
>   	int fd;
>   
> +	fd = open_pmu(I915_PMU_INTERRUPTS);
> +
>   	cal = calibrate_nop(gem_fd, calibration_us);
>   	sz = batch_len_us * cal / calibration_us;
>   
> -	fd = open_pmu(I915_PMU_INTERRUPTS);
> -
>   	gem_quiescent_gpu(gem_fd);
>   
>   	/* Wait for idle state. */
> 

Reviewed-by: Tvrtko Ursulin <tvrtko.ursulin at intel.com>

Regards,

Tvrtko


More information about the Intel-gfx mailing list