i965/bufmgr: Skip wait ioctl when not busy.
authorKenneth Graunke <kenneth@whitecape.org>
Mon, 17 Jul 2017 19:57:20 +0000 (12:57 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Sun, 23 Jul 2017 02:34:42 +0000 (19:34 -0700)
commitbdae2ddff89004c199b71cb6a4a306dee616f7f9
tree7ed9992f828a5b62fe42aee48e0e9b207c1ba20a
parent38e2142f392f9b6ac78eab72a1f92dd37553e1d8
i965/bufmgr: Skip wait ioctl when not busy.

If the buffer is idle, we I915_GEM_WAIT will return immediately,
so we may as well skip the ioctl altogether.  We can't trust the
"idle" flag for external buffers, but for most, it should be fine.

Reviewed-by: Matt Turner <mattst88@gmail.com>
src/mesa/drivers/dri/i965/brw_bufmgr.c