summaryrefslogtreecommitdiff
path: root/lib/drmtest.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/drmtest.c')
-rw-r--r--lib/drmtest.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 65441281..8f6c74eb 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -641,6 +641,16 @@ void gem_sw_finish(int fd, uint32_t handle)
do_ioctl(fd, DRM_IOCTL_I915_GEM_SW_FINISH, &finish);
}
+bool gem_bo_busy(int fd, uint32_t handle)
+{
+ struct drm_i915_gem_busy busy;
+
+ busy.handle = handle;
+
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_BUSY, &busy);
+
+ return !!busy.busy;
+}
/* prime */
int prime_handle_to_fd(int fd, uint32_t handle)