[igt-dev] [PATCH i-g-t 04/17] Add basic PXP testing of buffer and context alloc
Dixit, Ashutosh
ashutosh.dixit at intel.com
Mon May 17 14:42:49 UTC 2021
On Mon, 17 May 2021 03:26:34 -0700, Petri Latvala wrote:
>
> > +static int create_bo_ext(int i915, uint32_t size, bool protected_is_true, uint32_t *bo_out)
> > +{
> > + int ret;
> > +
> > + struct drm_i915_gem_create_ext_protected_content protected_ext = {
> > + .base = { .name = I915_GEM_CREATE_EXT_PROTECTED_CONTENT },
> > + .flags = 0,
> > + };
> > +
> > + struct drm_i915_gem_create_ext create_ext = {
> > + .size = size,
> > + .extensions = 0,
> > + };
> > +
> > + if (protected_is_true)
> > + create_ext.extensions = (uintptr_t)&protected_ext;
> > +
> > + ret = ioctl(i915, DRM_IOCTL_I915_GEM_CREATE_EXT, &create_ext);
>
> Why the naked ioctl on a DRM ioctl instead of the many wrappers we
> have in lib? (do_ioctl, do_ioctl_err, igt_ioctl, ...)
Mostly because Matt Auld's patchset which adds these wrappers for
DRM_IOCTL_I915_GEM_CREATE_EXT has not yet been merged.
More information about the igt-dev
mailing list