diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-08 08:58:41 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-08 17:34:48 +0000 |
commit | c037b4f542a7b21cbaecedec259da3589db10039 (patch) | |
tree | 8ec7790314ad2a0adfabb09d48074b810046a354 /src/sna/kgem_debug_gen7.c | |
parent | 26042b2660d87044e1920a1267d9984c00c9566a (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_gen7.c')
-rw-r--r-- | src/sna/kgem_debug_gen7.c | 30 |
1 files changed, 0 insertions, 30 deletions
diff --git a/src/sna/kgem_debug_gen7.c b/src/sna/kgem_debug_gen7.c index a33a918d..c13e96f2 100644 --- a/src/sna/kgem_debug_gen7.c +++ b/src/sna/kgem_debug_gen7.c @@ -88,8 +88,6 @@ static void gen7_update_vertex_buffer(struct kgem *kgem, const uint32_t *data) ptr = (char *)base + kgem->reloc[i].delta; i = data[0] >> 26; - if (state.vb[i].current) - kgem_bo_unmap(kgem, state.vb[i].base); state.vb[i].current = bo; state.vb[i].base = base; @@ -129,9 +127,6 @@ static void gen7_update_dynamic_buffer(struct kgem *kgem, const uint32_t offset) ptr = NULL; } - if (state.dynamic_state.current) - kgem_bo_unmap(kgem, state.dynamic_state.base); - state.dynamic_state.current = bo; state.dynamic_state.base = base; state.dynamic_state.ptr = ptr; @@ -300,22 +295,8 @@ static void primitive_out(struct kgem *kgem, uint32_t *data) } } -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); -} - static void 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)); } @@ -478,13 +459,6 @@ get_reloc(struct kgem *kgem, return (char *)base + (delta & ~3); } -static void -put_reloc(struct kgem *kgem, struct reloc *r) -{ - if (r->bo != NULL) - kgem_bo_unmap(kgem, r->bo); -} - static const char * gen7_filter_to_string(uint32_t filter) { @@ -539,8 +513,6 @@ gen7_decode_sampler_state(struct kgem *kgem, const uint32_t *reloc) ErrorF(" Sampler 1:\n"); ErrorF(" filter: min=%s, mag=%s\n", min, mag); ErrorF(" wrap: s=%s, t=%s, r=%s\n", s_wrap, t_wrap, r_wrap); - - put_reloc(kgem, &r); } static const char * @@ -604,8 +576,6 @@ gen7_decode_blend(struct kgem *kgem, const uint32_t *reloc) ErrorF(" Blend (%s): function %s, src=%s, dst=%s\n", blend->blend0.blend_enable ? "enabled" : "disabled", func, src, dst); - - put_reloc(kgem, &r); } int kgem_gen7_decode_3d(struct kgem *kgem, uint32_t offset) |