Re: [PATCH i-g-t] lib/i915: Trim ring measurement by one

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

 



Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> writes:

> Be a little more conservative in our ring measurement and exclude one
> batch to leave room in case our user needs to wrap (where a request will
> be expanded to cover the unused space at the end of the ring).
>

did read the wrapping part and that seems to be the case that
we enlarge the wrapping request.

However do we lose some coverage on the actual wrap tests?

-Mika

> References: https://bugs.freedesktop.org/show_bug.cgi?id=111374
> Signed-off-by: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
> ---
>  lib/i915/gem_ring.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
>
> diff --git a/lib/i915/gem_ring.c b/lib/i915/gem_ring.c
> index fdb9fc1b1..bf7f439e1 100644
> --- a/lib/i915/gem_ring.c
> +++ b/lib/i915/gem_ring.c
> @@ -103,7 +103,7 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
>  	} while (1);
>  
>  	igt_assert_eq(__execbuf(fd, &execbuf), -EINTR);
> -	igt_assert(count);
> +	igt_assert(count > 1);
>  
>  	memset(&itv, 0, sizeof(itv));
>  	setitimer(ITIMER_REAL, &itv, NULL);
> @@ -118,7 +118,8 @@ __gem_measure_ring_inflight(int fd, unsigned int engine, enum measure_ring_flags
>  
>  	gem_quiescent_gpu(fd);
>  
> -	return count;
> +	/* Be conservative in case we must wrap later */
> +	return count - 1;
>  }
>  
>  /**
> -- 
> 2.23.0.rc1
_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux