[igt-dev] [PATCH i-g-t 10/10] tests/i915/exec_fence: add timeline fence tests

Chris Wilson chris at chris-wilson.co.uk
Fri Aug 2 09:11:59 UTC 2019


Quoting Lionel Landwerlin (2019-08-02 10:03:59)
> On 31/07/2019 23:33, Chris Wilson wrote:
> > Quoting Lionel Landwerlin (2019-07-25 11:30:34)
> > You could move this to a second context and avoid the differentiation
> > between engines:
> >
> >       fence.flags = I915_EXEC_FENCE_WAIT;
> >       execbuf.rsvd1 = gem_context_create(fd);
> >
> >       n = 0;
> >       for_each_engine(fd, engine) {
> >               obj.handle = gem_create(fd, 4096);
> >               gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> >
> >               /* Unsynchronised will execute ahead of the blockage */
> >               execbuf.flags = engine;
> >               execbuf.cliprects_ptr = 0;
> >               gem_execbuf(fd, &execbuf);
> >               gem_sync(fd, obj.handle);
> 
> 
> Not quite sure this ends up blocking on engine=1.

It's a different context, it's allowed to execute ahead of the spinner
when the spinner exceeds its timeslice -- so long as preemption is
enabled on the spinner. If not, that's kernel bug.
-Chris


More information about the igt-dev mailing list