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

Chris Wilson ickle at kemper.freedesktop.org
Thu Apr 12 14:48:08 PDT 2012


 src/sna/kgem.c |    6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

New commits:
commit e269ed5d4e1b9d758aeb9a85ed0fa631f0aff0b1
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Apr 12 22:46:22 2012 +0100

    sna: Restore CPU domain for vmapped buffers when reusing
    
    For a vmapped upload buffer, we need to notify the kernel (and thereby
    the GPU) to invalidate the sampler and flush its caches when we reuse an
    idle buffer.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 6ea4d48..14a0067 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3600,6 +3600,10 @@ struct kgem_bo *kgem_create_buffer(struct kgem *kgem,
 			offset = 0;
 			bo->used = size;
 			list_move(&bo->base.list, &kgem->active_partials);
+
+			if (bo->base.vmap)
+				kgem_bo_sync__cpu(kgem, &bo->base);
+
 			goto done;
 		} while (kgem_retire(kgem));
 	}
commit d29b8650c40c673e6ddddaf52db9247e9836cba8
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Apr 12 22:23:12 2012 +0100

    sna: Revert use of mmap64()
    
    As this just causes mayhem on a 64-bit platform. Doomed if you, doomed
    if you don't. :(
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 109f3b7..6ea4d48 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -220,7 +220,7 @@ static void *gem_mmap(int fd, uint32_t handle, int size, int prot)
 		return NULL;
 	}
 
-	ptr = mmap64(0, size, prot, MAP_SHARED, fd, mmap_arg.offset);
+	ptr = mmap(0, size, prot, MAP_SHARED, fd, mmap_arg.offset);
 	if (ptr == MAP_FAILED) {
 		assert(0);
 		ptr = NULL;


More information about the xorg-commit mailing list