From 29253f44d00663c377a6b4f45511123a92abfd6a Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 5 Nov 2014 15:27:42 +0800 Subject: [PATCH] ilo: fix intel_bo_wait() on kernel 3.17 drm_intel_gem_bo_wait() with negative timeout is broken on kernel 3.17. Signed-off-by: Chia-I Wu --- src/gallium/winsys/intel/drm/intel_drm_winsys.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/winsys/intel/drm/intel_drm_winsys.c b/src/gallium/winsys/intel/drm/intel_drm_winsys.c index 7b542dcff37..9b94ac6b3a6 100644 --- a/src/gallium/winsys/intel/drm/intel_drm_winsys.c +++ b/src/gallium/winsys/intel/drm/intel_drm_winsys.c @@ -610,7 +610,13 @@ intel_bo_wait(struct intel_bo *bo, int64_t timeout) { int err; - err = drm_intel_gem_bo_wait(gem_bo(bo), timeout); + if (timeout >= 0) { + err = drm_intel_gem_bo_wait(gem_bo(bo), timeout); + } else { + drm_intel_bo_wait_rendering(gem_bo(bo)); + err = 0; + } + /* consider the bo idle on errors */ if (err && err != -ETIME) err = 0; -- 2.30.2