diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-12 15:20:49 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-09-12 15:20:49 +0100 |
commit | 1af1dae1feefd6567017170bab241570fb528e5c (patch) | |
tree | 7df82353a95fe988bda5277e9936484da423fb54 | |
parent | e5f137807c318588f546960668345eef34159e26 (diff) |
sna: Ensure tiling upload buffers are trimmed to fit in the cache
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/kgem.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 727cb511..d6a6d283 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -947,6 +947,12 @@ void kgem_init(struct kgem *kgem, int fd, struct pci_device *dev, int gen) kgem->large_object_size = MAX_CACHE_SIZE; if (kgem->large_object_size > kgem->max_gpu_size) kgem->large_object_size = kgem->max_gpu_size; + + if (kgem->max_upload_tile_size > kgem->large_object_size) + kgem->max_upload_tile_size = kgem->large_object_size; + if (kgem->max_copy_tile_size > kgem->large_object_size) + kgem->max_copy_tile_size = kgem->large_object_size; + if (kgem->has_llc | kgem->has_cacheing | kgem->has_userptr) { if (kgem->large_object_size > kgem->max_cpu_size) kgem->large_object_size = kgem->max_cpu_size; |