From: Tvrtko Ursulin <tvrtko.ursu...@intel.com> Return path from this function got confused in:
commit 02f93c21e6e1c3dad9d99349989daa84a8c0b5fb Author: Eric Anholt <e...@anholt.net> 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.ursu...@intel.com> Cc: Eric Anholt <e...@anholt.net> Cc: Kenneth Graunke <kenn...@whitecape.org> Cc: Chris Wilson <ch...@chris-wilson.co.uk> --- 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@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/intel-gfx