[Intel-gfx] [PATCH v14] drm/i915: Squash repeated awaits on the same fence
Chris Wilson
chris at chris-wilson.co.uk
Tue May 2 14:50:23 UTC 2017
On Tue, May 02, 2017 at 01:24:58PM +0100, Tvrtko Ursulin wrote:
> On 28/04/2017 20:02, Chris Wilson wrote:
> >+ prandom_seed_state(&prng, i915_selftest.random_seed);
> >+ count = 0;
> >+ kt = ktime_get();
> >+ end_time = jiffies + HZ/10;
> >+ do {
> >+ u32 id = random_engine(&prng);
> >+ u32 seqno = prandom_u32_state(&prng);
> >+
> >+ if (!__intel_timeline_sync_is_later(tl, id, seqno))
> >+ __intel_timeline_sync_set(tl, id, seqno);
> >+
> >+ count++;
> >+ } while (!time_after(jiffies, end_time));
> >+ kt = ktime_sub(ktime_get(), kt);
> >+ kt = ktime_sub_ns(kt, count * prng32_1M / M);
>
> Two randoms to account here.
Thank you. That fixes the discrepancy between the random_engine results
and using the engines in order.
-Chris
--
Chris Wilson, Intel Open Source Technology Centre
More information about the Intel-gfx
mailing list