sna: Add DBG option to disable snoop bo cacheing

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2014-06-18 10:16:26 +01:00
parent b208134584
commit 8ea2dd23ab
1 changed files with 6 additions and 0 deletions

View File

@ -64,6 +64,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
#define DBG_NO_EXEC 0
#define DBG_NO_TILING 0
#define DBG_NO_CACHE 0
#define DBG_NO_SNOOP_CACHE 0
#define DBG_NO_CACHE_LEVEL 0
#define DBG_NO_CPU 0
#define DBG_NO_CREATE2 0
@ -2068,6 +2069,11 @@ static void kgem_bo_move_to_snoop(struct kgem *kgem, struct kgem_bo *bo)
assert(bo->refcnt == 0);
assert(bo->exec == NULL);
if (DBG_NO_SNOOP_CACHE) {
kgem_bo_free(kgem, bo);
return;
}
if (num_pages(bo) > kgem->max_cpu_size >> 13) {
DBG(("%s handle=%d discarding large CPU buffer (%d >%d pages)\n",
__FUNCTION__, bo->handle, num_pages(bo), kgem->max_cpu_size >> 13));