diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-19 13:00:29 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2016-03-19 13:15:08 +0000 |
commit | c1fed522ae98b7c74700521f7b3e0368f0f0948e (patch) | |
tree | 73351e9723929faf2e75f894500fbcfdee64f50b /lib/ioctl_wrappers.h | |
parent | 4e4f5b4fdca7ea2a9da79fe5b0266d1d31908e1c (diff) |
lib: Replace drmIoctl() with a layer of indirection
Insted of calling drmIoctl() directly, call igt_ioctl() instead. In the
normal scenario this is function pointer that calls drmIoctl() (so no
penalty), but allows us to divert ioctls into our own routines for
nefarious purposes. One such purpose will be to control interrupt
generation into the ioctl, to be able to detect when we successfully
interrupt the ioctl and when we no longer need more interrupts.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'lib/ioctl_wrappers.h')
-rw-r--r-- | lib/ioctl_wrappers.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/ioctl_wrappers.h b/lib/ioctl_wrappers.h index c25c4e21..d986f61f 100644 --- a/lib/ioctl_wrappers.h +++ b/lib/ioctl_wrappers.h @@ -35,6 +35,8 @@ #include <intel_bufmgr.h> #include <i915_drm.h> +extern int (*igt_ioctl)(int fd, unsigned long request, void *arg); + /* libdrm interfacing */ drm_intel_bo * gem_handle_to_libdrm_bo(drm_intel_bufmgr *bufmgr, int fd, const char *name, uint32_t handle); |