DRM_IOCTL_I915_GEM_VM_* are missing
210bfdf8 added struct drm_i915_gem_vm_control
to <i915_drm.h>
but not DRM_IOCTL_I915_GEM_VM_CREATE
+ DRM_IOCTL_I915_GEM_VM_DESTROY
. See also https://github.com/torvalds/linux/commit/7f3f317a66ca
$ cc a.c $(pkg-config libdrm --cflags --libs)
a.c:13:20: error: use of undeclared identifier 'DRM_IOCTL_I915_GEM_VM_CREATE'
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_VM_CREATE, &ctl) < 0)
^
a.c:15:20: error: use of undeclared identifier 'DRM_IOCTL_I915_GEM_VM_DESTROY'
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_VM_DESTROY, &ctl) < 0)
^
2 errors generated.
$ cat a.c
#include <i915_drm.h>
#include <xf86drm.h>
#include <err.h>
int main()
{
int fd;
if ((fd = drmOpenWithType("i915", 0, DRM_NODE_RENDER)) < 0)
err(1, "drmOpenWithType failed");
struct drm_i915_gem_vm_control ctl = {};
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_VM_CREATE, &ctl) < 0)
err(1, "DRM_IOCTL_I915_GEM_VM_CREATE failed");
if (drmIoctl(fd, DRM_IOCTL_I915_GEM_VM_DESTROY, &ctl) < 0)
err(1, "DRM_IOCTL_I915_GEM_VM_DESTROY failed");
return 0;
}