if (drmCommandWrite(intel->driFd, DRM_I915_BATCHBUFFER, &batch,
sizeof(batch))) {
fprintf(stderr, "DRM_I915_BATCHBUFFER: %d\n", -errno);
- UNLOCK_HARDWARE(intel);
- exit(1);
+ return -errno;
}
+
+ return 0;
}
-void
+ #ifdef TTM_API
+int
intel_exec_ioctl(struct intel_context *intel,
GLuint used,
GLboolean ignore_cliprects, GLboolean allow_unlock,
} while (ret == -EAGAIN);
if (ret != 0) {
- fprintf(stderr, "DRM_I915_EXECBUFFER: %d\n", -errno);
- UNLOCK_HARDWARE(intel);
- exit(1);
+ fprintf(stderr, "DRM_I915_GEM_EXECBUFFER: %d\n", -errno);
+ return -errno;
}
- if (execbuf.fence_arg.error != 0) {
-
- /*
- * Fence creation has failed, but the GPU has been
- * idled by the kernel. Safe to continue.
- */
-
- *fence = NULL;
- return;
- }
-
- fo = intel_ttm_fence_create_from_arg(intel->bufmgr, "fence buffers",
- &execbuf.fence_arg);
- if (!fo) {
- fprintf(stderr, "failed to fence handle: %08x\n", execbuf.fence_arg.handle);
- UNLOCK_HARDWARE(intel);
- exit(1);
- }
- *fence = fo;
+ return 0;
}
-void
-intel_exec_ioctl(struct intel_context *intel,
- GLuint used,
- GLboolean ignore_cliprects, GLboolean allow_unlock,
- void *start, GLuint count, dri_fence **fence)
+ #else
++int
++int intel_exec_ioctl(struct intel_context *intel,
++ GLuint used,
++ GLboolean ignore_cliprects, GLboolean allow_unlock,
++ struct drm_i915_gem_execbuffer *execbuf);
+ {
++ return -EINVAL;
+ }
+ #endif