From c037b4f542a7b21cbaecedec259da3589db10039 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 8 Jan 2012 08:58:41 +0000 Subject: sna: Tune cache size for cpu bo cache This helps SNB on cairo-traces that utilize lots of temporary uploads (rasterised sources and masks for instance), but comes at a cost of regressing others... In order to counter the regression from increasing the GTT cache size, the CPU/GTT vma cache are split and accounted separately. Signed-off-by: Chris Wilson --- src/sna/kgem_debug_gen4.c | 23 ----------------------- 1 file changed, 23 deletions(-) (limited to 'src/sna/kgem_debug_gen4.c') diff --git a/src/sna/kgem_debug_gen4.c b/src/sna/kgem_debug_gen4.c index 0f91d29a..0004ecf5 100644 --- a/src/sna/kgem_debug_gen4.c +++ b/src/sna/kgem_debug_gen4.c @@ -89,8 +89,6 @@ static void gen4_update_vertex_buffer(struct kgem *kgem, const uint32_t *data) ptr = (char *)base + kgem->reloc[i].delta; i = data[0] >> 27; - if (state.vb[i].current) - kgem_bo_unmap(kgem, state.vb[i].current); state.vb[i].current = bo; state.vb[i].base = base; @@ -415,13 +413,6 @@ get_reloc(struct kgem *kgem, return (char *)base + delta; } - -static void -put_reloc(struct kgem *kgem, struct reloc *r) -{ - if (r->bo != NULL) - kgem_bo_unmap(kgem, r->bo); -} #endif int kgem_gen4_decode_3d(struct kgem *kgem, uint32_t offset) @@ -691,21 +682,7 @@ int kgem_gen4_decode_3d(struct kgem *kgem, uint32_t offset) return len; } -static void finish_vertex_buffers(struct kgem *kgem) -{ - int i; - - for (i = 0; i < ARRAY_SIZE(state.vb); i++) - if (state.vb[i].current) - kgem_bo_unmap(kgem, state.vb[i].current); -} - void kgem_gen4_finish_state(struct kgem *kgem) { - finish_vertex_buffers(kgem); - - if (state.dynamic_state.current) - kgem_bo_unmap(kgem, state.dynamic_state.base); - memset(&state, 0, sizeof(state)); } -- cgit v1.2.3