[igt-dev] [PATCH i-g-t 4/9] tests/gem_exec_big: Skip relocation part

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Aug 13 22:18:56 UTC 2021


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.

> @@ -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>x


More information about the igt-dev mailing list