summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/sna/kgem.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ae7ca10e..af4f0a81 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -292,6 +292,11 @@ retry_gtt:
if (kgem_expire_cache(kgem))
goto retry_gtt;
+ if (kgem->need_expire) {
+ kgem_cleanup_cache(kgem);
+ goto retry_gtt;
+ }
+
return NULL;
}
@@ -304,6 +309,11 @@ retry_mmap:
if (__kgem_throttle_retire(kgem, 0))
goto retry_mmap;
+ if (kgem->need_expire) {
+ kgem_cleanup_cache(kgem);
+ goto retry_mmap;
+ }
+
ptr = NULL;
}
@@ -4559,6 +4569,11 @@ retry:
if (__kgem_throttle_retire(kgem, 0))
goto retry;
+ if (kgem->need_expire) {
+ kgem_cleanup_cache(kgem);
+ goto retry;
+ }
+
return NULL;
}
@@ -4594,6 +4609,11 @@ retry:
if (__kgem_throttle_retire(kgem, 0))
goto retry;
+ if (kgem->need_expire) {
+ kgem_cleanup_cache(kgem);
+ goto retry;
+ }
+
return NULL;
}