}
+#define LOCAL_I915_EXEC_VEBOX (4 << 0)
/* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */
void gem_quiescent_gpu(int fd)
{
do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+ if (gem_has_blt(fd)) {
+ execbuf.flags = I915_EXEC_BLT;
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+ }
+
+ if (gem_has_bsd(fd)) {
+ execbuf.flags = I915_EXEC_BSD;
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+ }
+
+ if (gem_has_vebox(fd)) {
+ execbuf.flags = LOCAL_I915_EXEC_VEBOX;
+ do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf);
+ }
+
gem_sync(fd, handle);
}