nouveau: do a retry if initial buffer alloc fails
authorBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 07:28:07 +0000 (18:28 +1100)
committerBen Skeggs <skeggsb@gmail.com>
Fri, 21 Mar 2008 07:28:07 +0000 (18:28 +1100)
src/gallium/winsys/dri/nouveau/nouveau_bo.c

index 5dbb7d037444c7d9967acbeee69e665c508b500b..46c0759dbb4e8d46d1b4bde138c7eda0c09e9f31 100644 (file)
@@ -369,8 +369,13 @@ nouveau_bo_validate_bo(struct nouveau_channel *chan, struct nouveau_bo *bo,
        int ret;
 
        ret = nouveau_bo_set_status(bo, flags);
-       if (ret)
-               return ret;
+       if (ret) {
+               nouveau_fence_flush(chan);
+
+               ret = nouveau_bo_set_status(bo, flags);
+               if (ret)
+                       return ret;
+       }
 
        if (nvbo->user)
                nouveau_bo_upload(nvbo);