mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-06 05:08:08 +02:00
winsys/amdgpu: clear the buffer cache on mmap failure and try again
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
This commit is contained in:
parent
84a38bfc29
commit
369afdb7b6
1 changed files with 5 additions and 0 deletions
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue