[Intel-gfx] [PATCH 1/2] lib: Add gem_sw_finish()

ville.syrjala at linux.intel.com ville.syrjala at linux.intel.com
Mon Nov 25 16:08:40 CET 2013


From: Ville Syrjälä <ville.syrjala at linux.intel.com>

Wrap DRM_IOCTL_I915_GEM_SW_FINISH into gem_sw_finish()

Signed-off-by: Ville Syrjälä <ville.syrjala at linux.intel.com>
---
 lib/drmtest.c | 10 ++++++++++
 lib/drmtest.h |  2 ++
 2 files changed, 12 insertions(+)

diff --git a/lib/drmtest.c b/lib/drmtest.c
index 15ed847..6544128 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 5295a7b..1a243b1 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);
-- 
1.8.3.2




More information about the Intel-gfx mailing list