From 42330fbae862cda9ca17ec62eb0d2e4fb86032b8 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sun, 22 Sep 2013 14:39:57 +0100 Subject: sna: Track CPU/GTT maps independently Now that we use CPU mmaps to read/write to tiled X surfaces, we find ourselves frequently switching between CPU and GTT mmaps and so wish to cache both. Signed-off-by: Chris Wilson --- src/sna/gen3_render.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/sna/gen3_render.c') diff --git a/src/sna/gen3_render.c b/src/sna/gen3_render.c index 63dd5cc1..cb8f046d 100644 --- a/src/sna/gen3_render.c +++ b/src/sna/gen3_render.c @@ -2305,7 +2305,7 @@ static void gen3_vertex_close(struct sna *sna) sna->render.vertices = sna->render.vertex_data; sna->render.vertex_size = ARRAY_SIZE(sna->render.vertex_data); free_bo = bo; - } else if (IS_CPU_MAP(bo->map)) { + } else if (sna->render.vertices == MAP(bo->map__cpu)) { DBG(("%s: converting CPU map to GTT\n", __FUNCTION__)); sna->render.vertices = kgem_bo_map__gtt(&sna->kgem, bo); if (sna->render.vertices == NULL) { -- cgit v1.2.3