summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2013-11-22 22:33:21 +0200
committerVille Syrjälä <ville.syrjala@linux.intel.com>2013-11-27 16:21:28 +0200
commit525788a7360cca116b00819c14ee11c5913ffd42 (patch)
tree0fbeb1f291de0d8d8824fa1eb2c518273c1a384c /lib
parent725da6ee7458c5227a2bc9a1b686dad8f3c6d854 (diff)
lib: Add gem_sw_finish()
Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish() Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Diffstat (limited to 'lib')
-rw-r--r--lib/drmtest.c10
-rw-r--r--lib/drmtest.h2
2 files changed, 12 insertions, 0 deletions
diff --git a/lib/drmtest.c b/lib/drmtest.c
index 15ed8474..65441281 100644
--- a/lib/drmtest.c
+++ b/lib/drmtest.c
@@ -632,6 +632,16 @@ uint32_t gem_context_create(int fd)
return create.ctx_id;
}
+void gem_sw_finish(int fd, uint32_t handle)
+{
+ struct drm_i915_gem_sw_finish finish;
+
+ finish.handle = handle;
+
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_SW_FINISH, &finish);
+}
+
+
/* prime */
int prime_handle_to_fd(int fd, uint32_t handle)
{
diff --git a/lib/drmtest.h b/lib/drmtest.h
index 5295a7b0..1a243b1d 100644
--- a/lib/drmtest.h
+++ b/lib/drmtest.h
@@ -85,6 +85,8 @@ int gem_madvise(int fd, uint32_t handle, int state);
uint32_t gem_context_create(int fd);
+void gem_sw_finish(int fd, uint32_t handle);
+
/* feature test helpers */
bool gem_uses_aliasing_ppgtt(int fd);
int gem_available_fences(int fd);