[igt-dev] [PATCH i-g-t 4/9] tests/gem_exec_big: Skip relocation part
Zbigniew Kempczyński
zbigniew.kempczynski at intel.com
Mon Aug 16 05:42:56 UTC 2021
On Fri, Aug 13, 2021 at 03:18:56PM -0700, Dixit, Ashutosh wrote:
> On Fri, 13 Aug 2021 00:46:58 -0700, Zbigniew Kempczyński wrote:
> >
> > When running on platforms without relocation support, verification
> > of their correctness should be skipped. What remains is exercising
> > submission of large batches.
>
> Not sure if there's much point to this file in the absence of relocations
> since all it would do is bind the batch buffer in the gtt but the first
> instruction is already MI_BATCH_BUFFER_END. So the patch could possibly
> just be:
>
> igt_require(gem_has_relocations(i915));
>
> as was in the earlier version of the patch.
But we want to run this test, at least to try big batchbuffer. We skip
playing with relocations but still imo test is valuable for no-reloc gens.
--
Zbigniew
>
> > @@ -70,7 +71,7 @@ static void exec1(int fd, uint32_t handle, uint64_t reloc_ofs, unsigned flags, c
> > gem_reloc[0].presumed_offset = 0;
> >
> > gem_exec[0].handle = handle;
> > - gem_exec[0].relocation_count = 1;
> > + gem_exec[0].relocation_count = has_relocs ? 1 : 0;
> > gem_exec[0].relocs_ptr = to_user_pointer(gem_reloc);
> > gem_exec[0].alignment = 0;
> > gem_exec[0].offset = 0;
> > @@ -100,6 +101,9 @@ static void exec1(int fd, uint32_t handle, uint64_t reloc_ofs, unsigned flags, c
> > igt_warn_on(gem_reloc[0].presumed_offset == -1);
> > gem_set_domain(fd, gem_exec[0].handle, I915_GEM_DOMAIN_WC, 0);
> >
> > + if (!has_relocs)
> > + return;
> > +
>
> I would move this 2 lines above, right after gem_execbuf(), so that there's
> no confusion about verifying presumed_offset etc. in the absence of
> relocations.
>
> Otherwise this is:
>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
I missed your comment and I've already merged this test. You're absolutely
right and this should be after return. I'm going to move this in next series.
--
Zbigniew
More information about the igt-dev
mailing list