From: Tvrtko Ursulin <tvrtko.ursulin@xxxxxxxxx> Return path from this function got confused in: commit 02f93c21e6e1c3dad9d99349989daa84a8c0b5fb Author: Eric Anholt <eric@xxxxxxxxxx> 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 <tvrtko.ursulin@xxxxxxxxx> Cc: Eric Anholt <eric@xxxxxxxxxx> Cc: Kenneth Graunke <kenneth@xxxxxxxxxxxxx> Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx> --- intel/intel_bufmgr_gem.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/intel/intel_bufmgr_gem.c b/intel/intel_bufmgr_gem.c index dc28200ffecc..2f8bad88166a 100644 --- a/intel/intel_bufmgr_gem.c +++ b/intel/intel_bufmgr_gem.c @@ -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 -- 1.9.1 _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/intel-gfx