[igt-dev] [PATCH i-g-t 1/7] lib/gem_submission: Add kernel exec object alignment capability
Dixit, Ashutosh
ashutosh.dixit at intel.com
Wed Oct 13 04:47:18 UTC 2021
On Thu, 07 Oct 2021 23:54:26 -0700, Zbigniew Kempczyński wrote:
>
> +bool gem_allows_passing_alignment(int fd)
> +{
> + struct drm_i915_gem_exec_object2 obj = {
> + .handle = gem_create(fd, 4096),
> + };
> + struct drm_i915_gem_execbuffer2 execbuf = {
> + .buffers_ptr = to_user_pointer(&obj),
> + .buffer_count = 1,
> + };
> + bool ret;
> + const uint32_t bbe = MI_BATCH_BUFFER_END;
> +
> + gem_write(fd, obj.handle, 0, &bbe, sizeof(bbe));
> + gem_execbuf(fd, &execbuf);
> +
> + obj.alignment = 0x2000;
8K? Shouldn't this be less than 4K?
> + ret = __gem_execbuf(fd, &execbuf) == 0;
> + gem_close(fd, obj.handle);
> +
> + return ret;
> +}
More information about the igt-dev
mailing list