[igt-dev] [PATCH i-g-t v4 14/56] tests/gem_ctx_isolation: Adopt to use allocator

Dixit, Ashutosh ashutosh.dixit at intel.com
Fri Aug 6 20:57:27 UTC 2021


On Fri, 06 Aug 2021 06:41:03 -0700, Zbigniew Kempczyński wrote:
>
> For newer gens we're not able to rely on relocations. Adopt to use
> offsets acquired from the allocator.

Couple of fixes needed below, with that:

Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>

> @@ -353,6 +360,7 @@ static uint32_t read_regs(int fd,
>	gem_execbuf(fd, &execbuf);
>	gem_close(fd, obj[1].handle);
>	free(reloc);
> +	put_offset(ahnd, obj[1].handle);

put_offset(ahnd, obj[0].handle)?

> @@ -494,6 +510,7 @@ static void restore_regs(int fd,
>	execbuf.rsvd1 = ctx->id;
>	gem_execbuf(fd, &execbuf);
>	gem_close(fd, obj[1].handle);
> +	put_offset(ahnd, obj[1].offset);

put_offset(ahnd, obj[0].handle)?

> @@ -781,7 +816,9 @@ static void inject_reset_context(int fd, const intel_ctx_cfg_t *cfg,
>				 const struct intel_execution_engine2 *e)
>  {
>	const intel_ctx_t *ctx = create_reset_context(fd, cfg);
> +	uint64_t ahnd = get_reloc_ahnd(fd, ctx->id);
>	struct igt_spin_factory opts = {
> +		.ahnd = ahnd,
>		.ctx = ctx,
>		.engine = e->flags,
>		.flags = IGT_SPIN_FAST,

put_ahnd?


More information about the igt-dev mailing list