xf86-video-intel: src/sna/kgem.c

Chris Wilson ickle at kemper.freedesktop.org
Sun Sep 30 05:53:42 PDT 2012


 src/sna/kgem.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 8e23251aad6d56a59e626b623e59bafac3143562
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Sep 30 13:52:34 2012 +0100

    sna: Cache repeated use of the temporary CPU mapping for tiled_x uploads
    
    Fixes ShmPutImage regression under gnome-shell
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index ef11bfa..52d32bb 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4115,6 +4115,10 @@ retry:
 	}
 
 	VG(VALGRIND_MAKE_MEM_DEFINED(mmap_arg.addr_ptr, bytes(bo)));
+	if (bo->domain == DOMAIN_CPU) {
+		DBG(("%s: discarding GTT vma for %d\n", __FUNCTION__, bo->handle));
+		kgem_bo_release_map(kgem, bo);
+	}
 	if (bo->map == NULL) {
 		DBG(("%s: caching CPU vma for %d\n", __FUNCTION__, bo->handle));
 		bo->map = MAKE_CPU_MAP(mmap_arg.addr_ptr);


More information about the xorg-commit mailing list