diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-11 16:39:45 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2012-01-12 02:16:49 +0000 |
commit | a3c42565a8f557b2e7f7ff7bfa45b13b606f2968 (patch) | |
tree | 13330caa23d7a116afcb43492930c593f397b03a /src/sna/kgem_debug_gen7.c | |
parent | c64a9d0683e047a7eb041df78db746f6dd387b5e (diff) |
sna: Store damage-all in the low bit of the damage pointer
Avoid the function call overhead by inspecting the low bit to see if it
is all-damaged already.
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 | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sna/kgem_debug_gen7.c b/src/sna/kgem_debug_gen7.c index c13e96f2..a7dbbf21 100644 --- a/src/sna/kgem_debug_gen7.c +++ b/src/sna/kgem_debug_gen7.c @@ -83,7 +83,7 @@ static void gen7_update_vertex_buffer(struct kgem *kgem, const uint32_t *data) if (bo->handle == reloc) break; assert(&bo->request != &kgem->next_request->buffers); - base = kgem_bo_map(kgem, bo, PROT_READ); + base = kgem_bo_map__debug(kgem, bo); } ptr = (char *)base + kgem->reloc[i].delta; @@ -118,7 +118,7 @@ static void gen7_update_dynamic_buffer(struct kgem *kgem, const uint32_t offset) if (bo->handle == reloc) break; assert(&bo->request != &kgem->next_request->buffers); - base = kgem_bo_map(kgem, bo, PROT_READ); + base = kgem_bo_map__debug(kgem, bo); } ptr = (char *)base + (kgem->reloc[i].delta & ~1); } else { @@ -450,7 +450,7 @@ get_reloc(struct kgem *kgem, if (bo->handle == handle) break; assert(&bo->request != &kgem->next_request->buffers); - base = kgem_bo_map(kgem, bo, PROT_READ); + base = kgem_bo_map__debug(kgem, bo); r->bo = bo; r->base = base; } |