aboutsummaryrefslogtreecommitdiff
path: root/shared-core/i915_drm.h
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-05-25 20:45:20 -0700
committerKeith Packard <keithp@keithp.com>2008-05-25 20:45:20 -0700
commit7cf3fd29fe058a0bfc2ba7e889d1b360398be161 (patch)
treee56ab8ca8c61b0b7f3c930d7111fbe733ebbe655 /shared-core/i915_drm.h
parent6d1d11704ab36e4ee50b2c1d3b984ab6bb691417 (diff)
[intel-gem] Add DRM_I915_GEM_BUSY ioctl to check for idle buffers.
This new ioctl returns whether re-using the buffer would force a wait.
Diffstat (limited to 'shared-core/i915_drm.h')
-rw-r--r--shared-core/i915_drm.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/shared-core/i915_drm.h b/shared-core/i915_drm.h
index b50471f3..a8e09e72 100644
--- a/shared-core/i915_drm.h
+++ b/shared-core/i915_drm.h
@@ -180,6 +180,7 @@ typedef struct drm_i915_sarea {
#define DRM_I915_GEM_EXECBUFFER 0x14
#define DRM_I915_GEM_PIN 0x15
#define DRM_I915_GEM_UNPIN 0x16
+#define DRM_I915_GEM_BUSY 0x17
#define DRM_IOCTL_I915_INIT DRM_IOW( DRM_COMMAND_BASE + DRM_I915_INIT, drm_i915_init_t)
#define DRM_IOCTL_I915_FLUSH DRM_IO ( DRM_COMMAND_BASE + DRM_I915_FLUSH)
@@ -203,6 +204,7 @@ typedef struct drm_i915_sarea {
#define DRM_IOCTL_I915_GEM_EXECBUFFER DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_EXECBUFFER, struct drm_i915_gem_execbuffer)
#define DRM_IOCTL_I915_GEM_PIN DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_PIN, struct drm_i915_gem_pin)
#define DRM_IOCTL_I915_GEM_UNPIN DRM_IOW(DRM_COMMAND_BASE + DRM_I915_GEM_UNPIN, struct drm_i915_gem_unpin)
+#define DRM_IOCTL_I915_GEM_BUSY DRM_IOWR(DRM_COMMAND_BASE + DRM_I915_GEM_BUSY, struct drm_i915_gem_busy)
/* Asynchronous page flipping:
*/
@@ -536,5 +538,12 @@ struct drm_i915_gem_unpin {
uint32_t pad;
};
+struct drm_i915_gem_busy {
+ /** Handle of the buffer to check for busy */
+ uint32_t handle;
+
+ /** Return busy status (1 if busy, 0 if idle) */
+ uint32_t busy;
+};
#endif /* _I915_DRM_H_ */