summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2008-06-06 12:57:01 -0700
committerKeith Packard <keithp@keithp.com>2008-06-06 13:00:46 -0700
commit56a96841d01d112d7d4adfebb572016398551ba8 (patch)
tree30366179c53a31c83c0f47b9994b688d21d82cf2 /linux-core
parent329e0862255e8ad27e2aa4e3755421a18ea1acc5 (diff)
[intel-gem] Add explicit throttle ioctl
Instead of throttling and execbuffer time, have the application ask to throttle explicitly. This allows the throttle to happen less often, and without holding the DRM lock.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/i915_gem.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/linux-core/i915_gem.c b/linux-core/i915_gem.c
index 268411e8..14e57b41 100644
--- a/linux-core/i915_gem.c
+++ b/linux-core/i915_gem.c
@@ -1371,10 +1371,6 @@ i915_gem_execbuffer(struct drm_device *dev, void *data,
#endif
i915_kernel_lost_context(dev);
- ret = i915_gem_ring_throttle(dev);
- if (ret)
- return ret;
-
/* Copy in the exec list from userland */
exec_list = drm_calloc(sizeof(*exec_list), args->buffer_count,
DRM_MEM_DRIVER);
@@ -1628,6 +1624,13 @@ i915_gem_busy_ioctl(struct drm_device *dev, void *data,
return 0;
}
+int
+i915_gem_throttle_ioctl(struct drm_device *dev, void *data,
+ struct drm_file *file_priv)
+{
+ return i915_gem_ring_throttle(dev);
+}
+
int i915_gem_init_object(struct drm_gem_object *obj)
{
struct drm_i915_gem_object *obj_priv;