Quoting Tvrtko Ursulin (2019-09-23 17:21:50) > > On 23/09/2019 16:43, Chris Wilson wrote: > > Quoting Tvrtko Ursulin (2019-09-23 15:29:11) > >> > >> On 20/09/2019 23:26, Chris Wilson wrote: > >>> + spin = __igt_spin_new(i915, > >>> + .ctx = ctx, > >>> + .flags = (IGT_SPIN_NO_PREEMPTION | > >>> + IGT_SPIN_POLL_RUN)); > >>> + igt_spin_end(spin); /* we just want its address for later */ > >>> + gem_sync(i915, spin->handle); > >>> + igt_spin_reset(spin); > >>> + > >>> + obj[0] = spin->obj[0]; > >>> + obj[1] = spin->obj[1]; > > igt_assert_eq(IGT_SPIN_BATCH, 1); Sensible enough, it's always going to be tied to implementation as we play tricks from the gpu. > >>> + /* A: Submit the semaphore wait */ > >>> + eb.buffer_count = 3; > >>> + eb.flags = (1 + rand() % count) | I915_EXEC_FENCE_OUT; > >>> + gem_execbuf_wr(i915, &eb); > >>> + > >>> + /* B: Submit the spinner (in parallel) */ > >> > >> How in parallel when it is the same context so they are implicitly in order? > > > > Different engines with different timelines, using the submit to request > > parallel execution. > > Yeah I kind of missed a few things. Looks good. For completeness you > should also add a flavour which actually sets up the bond so the "if > (bond)" path in virtual_bond_execute is also exercised. But this looks good. I'll try to capture the questions in better comments. I was avoiding setting up the explicit bonds mostly because I was amazed to get a working test, and I was getting lost in the combinatorials to make it explicit :) (i.e. what should we do if we have more engines in the set). -Chris _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx