summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gallium/winsys/intel/drm/intel_drm_winsys.c8
1 files changed, 7 insertions, 1 deletions
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;