[igt-dev] [RFT v4 4/6] igt/i915: Require GTT mapping to be available when needed.

Chris Wilson chris at chris-wilson.co.uk
Wed Mar 27 21:24:49 UTC 2019


Quoting Antonio Argenziano (2019-03-27 21:05:52)
> 
> 
> On 25/03/19 16:36, Chris Wilson wrote:
> > Quoting Antonio Argenziano (2019-03-25 23:20:41)
> >> diff --git a/lib/igt_dummyload.c b/lib/igt_dummyload.c
> >> index 47f6b92b..2e4c0335 100644
> >> --- a/lib/igt_dummyload.c
> >> +++ b/lib/igt_dummyload.c
> >> @@ -117,9 +117,11 @@ emit_recursive_batch(igt_spin_t *spin,
> >>          obj[BATCH].handle = gem_create(fd, BATCH_SIZE);
> >>          batch = __gem_mmap__wc(fd, obj[BATCH].handle,
> >>                                 0, BATCH_SIZE, PROT_WRITE);
> >> -       if (!batch)
> >> +       if (!batch) {
> >> +               gem_require_mmap_gtt(fd);
> >>                  batch = gem_mmap__gtt(fd, obj[BATCH].handle,
> >>                                          BATCH_SIZE, PROT_WRITE);
> > 
> > batch = __gem_mmap__gtt();
> > igt_require(batch) ?
> > 
> > Possibly not as informative as gem_require_mmap_gtt() So ~o~
> > 
> >> diff --git a/tests/i915/gem_concurrent_all.c b/tests/i915/gem_concurrent_all.c
> >> index f719b0a1..e4fc1426 100644
> >> --- a/tests/i915/gem_concurrent_all.c
> >> +++ b/tests/i915/gem_concurrent_all.c
> >> @@ -1422,6 +1422,7 @@ static void cpu_require(void)
> >>   
> >>   static void gtt_require(void)
> >>   {
> >> +       gem_require_mmap_gtt(fd);
> >>   }
> > 
> > Needs the combinatorial explosion to exercise accessing via mmap-offset.
> > If you only update one stress test, update this one.
> 
> Don't we get the mmap-offset coverage by default in the wc test cases or 
> do you mean to use the mmap_offset IOCTL to mmap GTT?

No, I forgot that the library was going to automatic replacement of
gem_mmap__wc and friends. Must update this stress test, it is useful
simply because it runs forever and ends up being quite quite brutal.
(Even the trivial starting tests are too often enough to reveal issues.)
-Chris


More information about the igt-dev mailing list