[igt-dev] [PATCH i-g-t v4 37/56] tests/gem_tiled_fence_blits: Adopt to use allocator
Dixit, Ashutosh
ashutosh.dixit at intel.com
Sat Aug 7 00:37:25 UTC 2021
On Fri, 06 Aug 2021 06:41:26 -0700, Zbigniew Kempczyński wrote:
>
> For newer gens we're not able to rely on relocations. Adopt to use
> offsets acquired from the allocator.
Reviewed-by: Ashutosh Dixit <ashutosh.dixit at intel.com>
Just a question below.
> @@ -198,7 +209,23 @@ static void run_test(int fd, int count)
> reloc[0].target_handle = obj[0].handle = bo[dst];
> reloc[1].target_handle = obj[1].handle = bo[src];
>
> + if (ahnd) {
> + obj[0].offset = get_offset(ahnd, obj[0].handle,
> + sizeof(linear), 0);
> + obj[1].offset = get_offset(ahnd, obj[1].handle,
> + sizeof(linear), 0);
> + obj[2].offset = get_offset(ahnd, obj[2].handle,
> + 4096, 0);
> + update_batch(fd, obj[2].handle, reloc,
> + obj[0].offset, obj[1].offset);
> + }
> +
> gem_execbuf(fd, &eb);
> + if (ahnd) {
> + gem_close(fd, obj[2].handle);
> + obj[2].handle = gem_create(fd, 4096);
Is it necessary to update these offsets above, rather than just fix the
offsets at the beginning of the function? Also to recreate obj[2]? What we
have above is fine but just wondering the reason for it. Thanks.
More information about the igt-dev
mailing list