summaryrefslogtreecommitdiff
path: root/src/sna/kgem.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/sna/kgem.c')
-rw-r--r--src/sna/kgem.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index f8b3cff2..66bf473c 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3906,9 +3906,12 @@ bool kgem_check_bo_fenced(struct kgem *kgem, struct kgem_bo *bo)
if (kgem->nfence >= kgem->fence_max)
return false;
+ if (3*kgem->aperture_fenced > kgem->aperture_mappable)
+ return false;
+
size = kgem->aperture_fenced;
size += kgem_bo_fenced_size(kgem, bo);
- if (4*size > 3*kgem->aperture_mappable)
+ if (3*size > 2*kgem->aperture_mappable)
return false;
}
@@ -3932,12 +3935,12 @@ bool kgem_check_bo_fenced(struct kgem *kgem, struct kgem_bo *bo)
if (kgem->nfence >= kgem->fence_max)
return false;
- if (2*kgem->aperture_fenced > kgem->aperture_mappable)
+ if (3*kgem->aperture_fenced > kgem->aperture_mappable)
return false;
size = kgem->aperture_fenced;
size += kgem_bo_fenced_size(kgem, bo);
- if (4*size > 3*kgem->aperture_mappable)
+ if (3*size > 2*kgem->aperture_mappable)
return false;
}
@@ -3982,10 +3985,10 @@ bool kgem_check_many_bo_fenced(struct kgem *kgem, ...)
if (kgem->nfence + num_fence > kgem->fence_max)
return false;
- if (2*kgem->aperture_fenced > kgem->aperture_mappable)
+ if (3*kgem->aperture_fenced > kgem->aperture_mappable)
return false;
- if (4*(fenced_size + kgem->aperture_fenced) > 3*kgem->aperture_mappable)
+ if (3*(fenced_size + kgem->aperture_fenced) > 2*kgem->aperture_mappable)
return false;
}