[igt-dev] [PATCH i-g-t 1/2] tests/gem_exec_store: Support gens without relocations

Dixit, Ashutosh ashutosh.dixit at intel.com
Wed Mar 30 06:08:11 UTC 2022


On Tue, 10 Aug 2021 12:14:24 -0700, Andrzej Turko wrote:
>
> @@ -213,24 +257,41 @@ static void store_all(int fd, const intel_ctx_t *ctx)
>		execbuf.flags |= I915_EXEC_SECURE;
>	execbuf.rsvd1 = ctx->id;
>
> +	ahnd = intel_allocator_open(fd, ctx->id, INTEL_ALLOCATOR_SIMPLE);
> +
>	memset(obj, 0, sizeof(obj));
>	obj[0].handle = gem_create(fd, nengine*sizeof(uint32_t));
> +	obj[0].offset = intel_allocator_alloc(ahnd, obj[0].handle,
> +					      nengine*sizeof(uint32_t), ALIGNMENT);
> +	obj[0].flags = EXEC_OBJECT_SUPPORTS_48B_ADDRESS | EXEC_OBJECT_WRITE;
> +	obj[0].offset = CANONICAL(obj[0].offset);
>	obj[1].handle = gem_create(fd, 2*nengine*sizeof(batch));
> -	obj[1].relocation_count = 1;
> +	obj[1].offset = intel_allocator_alloc(ahnd, obj[1].handle,
> +					      nengine*sizeof(uint32_t), ALIGNMENT);

Is this correct, or should the size argument be 2*nengine*sizeof(batch)
(instead of nengine*sizeof(uint32_t))?

> +	obj[1].offset = CANONICAL(obj[1].offset);
> +	obj[1].flags |= EXEC_OBJECT_SUPPORTS_48B_ADDRESS;


More information about the igt-dev mailing list