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

Chris Wilson ickle at kemper.freedesktop.org
Sun May 31 11:12:35 PDT 2015


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

New commits:
commit 834bdb0344f1e71c3c0e8c31e47bd44cec28e584
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun May 31 19:11:54 2015 +0100

    sna: Relax a couple of tiling assertions
    
    Along a couple of passes, we have to set pitch back to 0 when reusing a
    linear surface.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 832ddb1..5935263 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -4373,7 +4373,7 @@ retry_large:
 					goto discard;
 			}
 			assert(bo->tiling == I915_TILING_NONE);
-			assert(bo->pitch == 0);
+			bo->pitch = 0;
 
 			if (bo->purged && !kgem_bo_clear_purgeable(kgem, bo))
 				goto discard;
@@ -4516,7 +4516,7 @@ discard:
 			}
 		}
 		assert(bo->tiling == I915_TILING_NONE);
-		assert(bo->pitch == 0);
+		bo->pitch = 0;
 
 		if (bo->map__gtt || bo->map__wc || bo->map__cpu) {
 			if (flags & (CREATE_CPU_MAP | CREATE_GTT_MAP)) {
@@ -5373,6 +5373,9 @@ large_inactive:
 					break;
 				}
 
+				if (tiling == I915_TILING_NONE)
+					bo->pitch = pitch;
+
 				assert(bo->tiling == tiling);
 				assert(bo->pitch >= pitch);
 				bo->delta = 0;


More information about the xorg-commit mailing list