diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-14 15:37:56 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-12-14 15:37:56 +0000 |
commit | 9df9585cb00958b42461b3139bb7aec32090a869 (patch) | |
tree | 30da0e5c49813dda62ddfcb6fea529df7f5a30d1 /src | |
parent | 0d3ba44e448c152a570cc469d289ab057fa7be5c (diff) |
sna: Reduce fence watermarks
Further restrict the amount of fenced bo we try to fit into the batch to
make it easier for the kernel to accommodate the request.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src')
-rw-r--r-- | src/sna/kgem.c | 13 |
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; } |