libdrm_intel: Fix return from drm_intel_gem_bo_busy
PATCH 1/1 libdrm_intel: Fix return from drm_intel_gem_bo_busy
From: Tvrtko Ursulin <[email protected]>
Return path from this function got confused in:
commit 02f93c21e6e1c3dad9d99349989daa84a8c0b5fb
Author: Eric Anholt <[email protected]>
Date: Wed Jan 15 00:38:39 2014 -0800
intel: Track whether a buffer is idle to avoid trips to the kernel.
Consolidate the return paths and stop leaking out the internal driver state since the API was intended to be a boolean.
Signed-off-by Tvrtko Ursulin <[email protected]>
Cc Eric Anholt <[email protected]>
Cc Kenneth Graunke <[email protected]>
Cc Chris Wilson <[email protected]>
--- intel/intel_bufmgr_gem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
intel/intel_bufmgr_gem.c +3 -4
@@ -663,11 +663,10 @@ drm_intel_gem_bo_busy(drm_intel_bo *bo) ret =drmIoctl (bufmgr_gem->fd,DRM_IOCTL_I915_GEM_BUSY , &busy);if (ret ==0 ) { bo_gem->idle = !busy.busy; -return busy.busy; - }else { -return false; +return !bo_gem->idle; } -return (ret ==0 && busy.busy); + +return false; } static int
Signature · 6 lines
1.9.1 _______________________________________________ Intel-gfx mailing list [email protected] http://lists.freedesktop.org/mailman/listinfo/intel-gfx