From 1af1dae1feefd6567017170bab241570fb528e5c Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 12 Sep 2012 15:20:49 +0100 Subject: sna: Ensure tiling upload buffers are trimmed to fit in the cache Signed-off-by: Chris Wilson --- src/sna/kgem.c | 6 ++++++ 1 file changed, 6 insertions(+) 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; -- cgit v1.2.3