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

Chris Wilson ickle at kemper.freedesktop.org
Thu Apr 4 02:59:15 PDT 2013


 src/sna/kgem.c |    5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

New commits:
commit 4a43aa81e27e8a651fde8a4761fd14bd8824d90c
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Thu Apr 4 10:53:55 2013 +0100

    sna: Restore bo->flush status for large bo
    
    Since we started discarding the flush flags on cached bo (in order to
    prevent DRI flush states leaking), we failed to preserve the flush flag
    for large bo (which uses it to keep batches trim and other hints).
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index c670dbb..4136ce9 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -3606,7 +3606,6 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
 			assert(!bo->scanout);
 			assert(bo->refcnt == 0);
 			assert(bo->reusable);
-			assert(bo->flush == true);
 
 			if (kgem->gen < 040) {
 				if (bo->pitch < pitch) {
@@ -3640,6 +3639,7 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
 			     bo->pitch, bo->tiling, bo->handle, bo->unique_id));
 			assert(bo->pitch*kgem_aligned_height(kgem, height, bo->tiling) <= kgem_bo_size(bo));
 			bo->refcnt = 1;
+			bo->flush = true;
 			return bo;
 		}
 
commit ed3dab44a717a1a88470228b5e33f20de1e4ad0d
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Apr 2 15:20:52 2013 +0100

    sna: Adjust userptr structure for implicit padding
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 9013e68..c670dbb 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -128,7 +128,7 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
 #define LOCAL_IOCTL_I915_GEM_USERPTR DRM_IOWR (DRM_COMMAND_BASE + LOCAL_I915_GEM_USERPTR, struct local_i915_gem_userptr)
 struct local_i915_gem_userptr {
 	uint64_t user_ptr;
-	uint32_t user_size;
+	uint64_t user_size;
 	uint32_t flags;
 #define I915_USERPTR_READ_ONLY (1<<0)
 #define I915_USERPTR_UNSYNCHRONIZED (1<<31)
@@ -1482,6 +1482,7 @@ static void kgem_bo_free(struct kgem *kgem, struct kgem_bo *bo)
 
 	if (IS_USER_MAP(bo->map)) {
 		assert(bo->rq == NULL);
+		assert(!__kgem_busy(kgem, bo->handle));
 		assert(MAP(bo->map) != bo || bo->io || bo->flush);
 		if (!(bo->io || bo->flush)) {
 			DBG(("%s: freeing snooped base\n", __FUNCTION__));


More information about the xorg-commit mailing list