aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorBen Skeggs <[email protected]>2009-07-29 10:58:05 +1000
committerBen Skeggs <[email protected]>2009-07-29 10:58:05 +1000
commit625bc0cfa2ffb67b797672f7fb3c083a863199d3 (patch)
treeb4ba7caca7f1b8b20004a9529683984c47fe18c3 /src/gallium/drivers/nouveau
parent84166a021fe7b4a05f03d0119d2954998f7f12c6 (diff)
nouveau: map_range returning -EBUSY isn't necessarily an error
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/nouveau_screen.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gallium/drivers/nouveau/nouveau_screen.c b/src/gallium/drivers/nouveau/nouveau_screen.c
index 832366e6462..e4cf91c005c 100644
--- a/src/gallium/drivers/nouveau/nouveau_screen.c
+++ b/src/gallium/drivers/nouveau/nouveau_screen.c
@@ -4,6 +4,8 @@
#include <util/u_memory.h>
+#include <errno.h>
+
#include "nouveau/nouveau_bo.h"
#include "nouveau_winsys.h"
#include "nouveau_screen.h"
@@ -141,12 +143,13 @@ nouveau_screen_bo_map_range(struct pipe_screen *pscreen, struct pipe_buffer *pb,
unsigned offset, unsigned length, unsigned usage)
{
struct nouveau_bo *bo = nouveau_bo(pb);
+ uint32_t flags = nouveau_screen_map_flags(usage);
int ret;
- ret = nouveau_bo_map_range(bo, offset, length,
- nouveau_screen_map_flags(usage));
+ ret = nouveau_bo_map_range(bo, offset, length, flags);
if (ret) {
- debug_printf("map_range failed: %d\n", ret);
+ if (!(flags & NOUVEAU_BO_NOWAIT) || ret != -EBUSY)
+ debug_printf("map_range failed: %d\n", ret);
return NULL;
}