[Intel-gfx] [i-g-t PATCH v7 3/5] igt/gem_wait: Use new igt_spin_batch

Chris Wilson chris at chris-wilson.co.uk
Thu Nov 17 10:22:04 UTC 2016


On Wed, Nov 16, 2016 at 11:18:02PM +0200, Abdiel Janulgue wrote:
> +	int wait_s = (flags == 0) ? NSEC_PER_SEC : 0;
> +	wait_s = ((flags & HANG) == 0) ? wait_s : -1;
> +	igt_spin_t *spin = igt_spin_batch_new(fd, wait_s, engine, 0);

We haven't been using C99 locals.

If you separated out the timer as a seperate call, this would be nicer,
as most users don't use it.

> +	int timeout;
>  
>  	memset(&wait, 0, sizeof(wait));
> -	wait.bo_handle = obj.handle;
> -	igt_assert_eq(__gem_wait(fd, &wait), -ETIME);

This assert should remain since it is a sanitycheck that we are setup
for testing a wait.

Other than that I could bikeshed the names for years to come, looks ok.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Intel-gfx mailing list