From feaf779de5adb587214faa3f935360e0e4aa0c25 Mon Sep 17 00:00:00 2001 From: Tvrtko Ursulin Date: Thu, 11 May 2017 13:00:51 +0100 Subject: gem_wsim: Two small tidies Tidy last in the array presumed offset setting even though this code path is not used at the moment. Also use READ_ONCE on all fields we are trying to read from the status page. Signed-off-by: Tvrtko Ursulin --- benchmarks/gem_wsim.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'benchmarks/gem_wsim.c') diff --git a/benchmarks/gem_wsim.c b/benchmarks/gem_wsim.c index 58a428ab..e09ef257 100644 --- a/benchmarks/gem_wsim.c +++ b/benchmarks/gem_wsim.c @@ -888,8 +888,8 @@ static void get_rt_depth(struct workload *wrk, do { latch = READ_ONCE(wrk->status_page[idx + 3]); - rt->submitted = wrk->status_page[idx + 1]; - rt->completed = wrk->status_page[idx + 2]; + rt->submitted = READ_ONCE(wrk->status_page[idx + 1]); + rt->completed = READ_ONCE(wrk->status_page[idx + 2]); rt->seqno = READ_ONCE(wrk->status_page[idx]); } while (latch != rt->seqno); } @@ -1094,6 +1094,7 @@ update_bb_rt(struct w_step *w, enum intel_engine_id engine, uint32_t seqno) if (!(w->eb.flags & I915_EXEC_NO_RELOC)) { w->reloc[1].presumed_offset = -1; w->reloc[2].presumed_offset = -1; + w->reloc[3].presumed_offset = -1; } } -- cgit v1.2.3