summaryrefslogtreecommitdiff
path: root/benchmarks
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2017-05-09 18:53:33 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2017-05-09 18:55:01 +0100
commitcfd94fa1a1d67aff0ed3615f76e9b35193f0a1ec (patch)
tree69d10ea752228180d52721ac76c39b686128c205 /benchmarks
parentcb161195753cb4a2c5ff5bb8746846d55ae32a54 (diff)
wsim: Fixup breaking the read loop after the seqno advances.
Oops. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'benchmarks')
-rw-r--r--benchmarks/gem_wsim.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c
index 7260b82d..36285c5c 100644
--- a/benchmarks/gem_wsim.c
+++ b/benchmarks/gem_wsim.c
@@ -831,15 +831,20 @@ static void get_rt_depth(struct workload *wrk,
unsigned int engine,
struct rt_depth *rt)
{
- int idx = VCS_SEQNO_IDX(engine);
+ const unsigned int idx = VCS_SEQNO_IDX(engine);
uint32_t old;
old = READ_ONCE(wrk->status_page[idx]);
do {
rt->submitted = wrk->status_page[idx + 1];
rt->completed = wrk->status_page[idx + 2];
- rt->seqno = READ_ONCE(wrk->status_page[VCS_SEQNO_IDX(engine)]);
- } while (rt->seqno != old);
+ rt->seqno = READ_ONCE(wrk->status_page[idx]);
+
+ if (old == rt->seqno)
+ return;
+
+ old = rt->seqno;
+ } while (1);
}
static enum intel_engine_id