From: Tvrtko Ursulin <tvrtko.ursulin@linux.intel.com>
To: Intel-gfx@lists.freedesktop.org
Subject: [PATCH 2/4] tests/eviction_common: Avoid submitting duplicate objects
Date: Mon, 3 Feb 2014 10:59:41 +0000 [thread overview]
Message-ID: <1391425183-1980-3-git-send-email-tvrtko.ursulin@linux.intel.com> (raw)
In-Reply-To: <1391425183-1980-1-git-send-email-tvrtko.ursulin@linux.intel.com>
From: Tvrtko Ursulin <tvrtko.ursulin@intel.com>
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 <tvrtko.ursulin@intel.com>
---
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
next prev parent reply other threads:[~2014-02-03 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-02-03 10:59 [PATCH 0/4] tests: New userptr test case Tvrtko Ursulin
2014-02-03 10:59 ` [PATCH 1/4] tests/gem_evict_everything: Factor out eviction logic Tvrtko Ursulin
2014-02-03 10:59 ` Tvrtko Ursulin [this message]
2014-02-04 12:25 ` [PATCH 2/4] tests/eviction_common: Avoid submitting duplicate objects Daniel Vetter
2014-02-03 10:59 ` [PATCH 3/4] tests/gem_userptr_blits: Expanded userptr test cases Tvrtko Ursulin
2014-02-04 14:09 ` Daniel Vetter
2014-02-03 10:59 ` [PATCH 4/4] tests/gem_vmap_blits: Remove obsolete test case Tvrtko Ursulin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1391425183-1980-3-git-send-email-tvrtko.ursulin@linux.intel.com \
--to=tvrtko.ursulin@linux.intel.com \
--cc=Intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox