summaryrefslogtreecommitdiff
path: root/src/sna/kgem_debug_gen5.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2012-01-08 08:58:41 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2012-01-08 17:34:48 +0000
commitc037b4f542a7b21cbaecedec259da3589db10039 (patch)
tree8ec7790314ad2a0adfabb09d48074b810046a354 /src/sna/kgem_debug_gen5.c
parent26042b2660d87044e1920a1267d9984c00c9566a (diff)
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 <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/kgem_debug_gen5.c')
-rw-r--r--src/sna/kgem_debug_gen5.c23
1 files changed, 0 insertions, 23 deletions
diff --git a/src/sna/kgem_debug_gen5.c b/src/sna/kgem_debug_gen5.c
index c4f5df15..7912cc91 100644
--- a/src/sna/kgem_debug_gen5.c
+++ b/src/sna/kgem_debug_gen5.c
@@ -84,8 +84,6 @@ static void gen5_update_vertex_buffer(struct kgem *kgem, const uint32_t *data)
ptr = (char *)base + reloc->delta;
i = data[0] >> 27;
- if (state.vb[i].current)
- kgem_bo_unmap(kgem, state.vb[i].current);
state.vb[i].handle = reloc->target_handle;
state.vb[i].current = bo;
@@ -389,13 +387,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_umap(kgem, r->bo);
-}
#endif
int kgem_gen5_decode_3d(struct kgem *kgem, uint32_t offset)
@@ -667,21 +658,7 @@ int kgem_gen5_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_gen5_finish_state(struct kgem *kgem)
{
- finish_vertex_buffers(kgem);
-
- if (state.dynamic_state.current)
- kgem_bo_unmap(kgem,state. dynamic_state.current);
-
memset(&state, 0, sizeof(state));
}