Re: [Intel-gfx] [PATCH 2/4] tests/eviction_common: Avoid submitting duplicate objects

2014-02-04 Thread Daniel Vetter
On Mon, Feb 03, 2014 at 10:59:41AM +, Tvrtko Ursulin wrote:
> From: Tvrtko Ursulin 
> 
> Make sure selection loop does not generate duplicates
> when it picks a subset of objects for a single exec buffer.
> 
> Signed-off-by: Tvrtko Ursulin 

I've pulled in the first two patches and also fixed up make distcheck -
eviction_common.c wasn't included in the tarballs.
-Daniel
-- 
Daniel Vetter
Software Engineer, Intel Corporation
+41 (0) 79 365 57 48 - http://blog.ffwll.ch
___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx


[Intel-gfx] [PATCH 2/4] tests/eviction_common: Avoid submitting duplicate objects

2014-02-03 Thread Tvrtko Ursulin
From: Tvrtko Ursulin 

Make sure selection loop does not generate duplicates
when it picks a subset of objects for a single exec buffer.

Signed-off-by: Tvrtko Ursulin 
---
 tests/eviction_common.c | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/tests/eviction_common.c b/tests/eviction_common.c
index efe560c..91fb2df 100644
--- a/tests/eviction_common.c
+++ b/tests/eviction_common.c
@@ -65,6 +65,13 @@ static int minor_evictions(int fd, struct 
igt_eviction_test_ops *ops,
uint32_t *bo, *sel;
int n, m, pass, fail;
 
+   /* Make sure nr_surfaces is not divisible by seven
+* to avoid duplicates in the selection loop below.
+*/
+   nr_surfaces /= 7;
+   nr_surfaces *= 7;
+   nr_surfaces += 3;
+
igt_require((uint64_t)nr_surfaces * surface_size / (1024 * 1024)
< intel_get_total_ram_mb() * 9 / 10);
 
-- 
1.8.4.3

___
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx