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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux