summaryrefslogtreecommitdiff
path: root/benchmarks/gem_wsim.c
diff options
context:
space:
mode:
Diffstat (limited to 'benchmarks/gem_wsim.c')
-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