lib: make sure all rings are idle in gpu_quiescent_gpu()

Signed-off-by: Imre Deak <imre.deak@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Imre Deak 2013-05-28 17:22:57 +03:00 committed by Daniel Vetter
parent 55876338fa
commit a3b47dbe69

View File

@ -109,6 +109,7 @@ int gem_available_fences(int fd)
} }
#define LOCAL_I915_EXEC_VEBOX (4 << 0)
/* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */ /* Ensure the gpu is idle by launching a nop execbuf and stalling for it. */
void gem_quiescent_gpu(int fd) void gem_quiescent_gpu(int fd)
{ {
@ -143,6 +144,21 @@ void gem_quiescent_gpu(int fd)
do_ioctl(fd, DRM_IOCTL_I915_GEM_EXECBUFFER2, &execbuf); 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); gem_sync(fd, handle);
} }