[igt-dev] [PATCH i-g-t v31 13/32] lib/igt_fb: Removal of libdrm dependency
Chris Wilson
chris at chris-wilson.co.uk
Wed Aug 26 16:09:06 UTC 2020
Quoting Zbigniew Kempczyński (2020-08-20 07:30:11)
> + bo_name = gem_flink(blit->fd, fb->gem_handle);
> + handle = gem_open(blit->fd, bo_name);
> + buf = calloc(1, sizeof(*buf));
> + igt_assert(buf);
> + intel_buf_init_using_handle(blit->bops, handle, buf, fb->width,
> + fb->height, fb->plane_bpp[0], 0,
> + igt_fb_mod_to_tiling(fb->modifier),
> + compression);
> + intel_buf_set_name(buf, name);
I'd wrap this into a local buf_create_for_handle routine. Which does beg
the question where are we creating a new handle if we already have a
gem_handle? Lifetime worries? That's not explained...
I'd guess lifetime. In which case that would be an internal detail of
intel_buf leaking through, and I would suggest pushing the routine into
the library if it takes ownership of the handle.
-Chris
More information about the igt-dev
mailing list