projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84a38bf
)
winsys/amdgpu: clear the buffer cache on mmap failure and try again
author
Marek Olšák
<marek.olsak@amd.com>
Wed, 9 Dec 2015 21:45:56 +0000
(22:45 +0100)
committer
Marek Olšák
<marek.olsak@amd.com>
Fri, 11 Dec 2015 14:25:13 +0000
(15:25 +0100)
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
patch
|
blob
|
history
diff --git
a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index 90f3a9f35d0be53f411ec370562ee7df1a6ee586..a8447731dc9ef62b6b31f6ca8675bbf393054e65 100644
(file)
--- a/
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@
-229,6
+229,11
@@
static void *amdgpu_bo_map(struct pb_buffer *buf,
return bo->user_ptr;
r = amdgpu_bo_cpu_map(bo->bo, &cpu);
+ if (r) {
+ /* Clear the cache and try again. */
+ pb_cache_release_all_buffers(&bo->ws->bo_cache);
+ r = amdgpu_bo_cpu_map(bo->bo, &cpu);
+ }
return r ? NULL : cpu;
}