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

Chris Wilson ickle at kemper.freedesktop.org
Sat Jul 25 03:56:41 PDT 2015


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

New commits:
commit bff0272b4fbd0e786f77a0f5a9e4ad1eb6df893e
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sat Jul 25 11:54:04 2015 +0100

    sna: Put the assert(!kgem->can_fence) back to where they were
    
    Still need to improve the handling of set_gpu_tiling() to mark up the
    unfenceable buffers better, but we can't more the asserts here as we
    don't have the kgem struct available.
    
    Fixes 2f1623daed94b98d3bae3c9ee8346e8de9afc33d with asserts enabled
    
    Reported-by: Sedat Dilek <sedat.dilek at gmail.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 16f49ba..dc54a53 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -5113,7 +5113,6 @@ static void __kgem_bo_make_scanout(struct kgem *kgem,
 
 static void set_gpu_tiling(struct kgem_bo *bo, int tiling, int pitch)
 {
-	assert(!kgem->can_fence);
 	bo->tiling = tiling;
 	bo->pitch = pitch;
 	if (tiling && bo->map__gtt) {
@@ -5301,8 +5300,10 @@ struct kgem_bo *kgem_create_2d(struct kgem *kgem,
 					continue;
 
 				if (!kgem_set_tiling(kgem, bo, tiling, pitch) &&
-				    !exact)
+				    !exact) {
+					assert(!kgem->can_fence);
 					set_gpu_tiling(bo, tiling, pitch);
+				}
 			}
 
 			kgem_bo_remove_from_active(kgem, bo);
@@ -5329,9 +5330,10 @@ large_inactive:
 				continue;
 
 			if (!kgem_set_tiling(kgem, bo, tiling, pitch)) {
-				if (kgem->gen >= 040 && !exact)
+				if (kgem->gen >= 040 && !exact) {
+					assert(!kgem->can_fence);
 					set_gpu_tiling(bo, tiling, pitch);
-				else
+				} else
 					continue;
 			}
 
@@ -5477,8 +5479,10 @@ search_active:
 					continue;
 
 				if (!kgem_set_tiling(kgem, bo, tiling, pitch) &&
-				    !exact)
+				    !exact) {
+					assert(!kgem->can_fence);
 					set_gpu_tiling(bo, tiling, pitch);
+				}
 			}
 			assert(bo->tiling == tiling);
 			assert(bo->pitch >= pitch);
@@ -5538,6 +5542,7 @@ search_active:
 
 				if (!kgem_set_tiling(kgem, bo, tiling, pitch)) {
 					if (kgem->gen >= 040 && !exact) {
+						assert(!kgem->can_fence);
 						set_gpu_tiling(bo, tiling, pitch);
 					} else {
 						kgem_bo_free(kgem, bo);
@@ -5629,6 +5634,7 @@ search_inactive:
 
 		if (!kgem_set_tiling(kgem, bo, tiling, pitch)) {
 			if (kgem->gen >= 040 && !exact) {
+				assert(!kgem->can_fence);
 				set_gpu_tiling(bo, tiling, pitch);
 			} else {
 				kgem_bo_free(kgem, bo);
@@ -5695,6 +5701,7 @@ search_inactive:
 
 			if (!kgem_set_tiling(kgem, bo, tiling, pitch)) {
 				if (kgem->gen >= 040 && !exact) {
+					assert(!kgem->can_fence);
 					set_gpu_tiling(bo, tiling, pitch);
 				} else {
 					kgem_bo_free(kgem, bo);


More information about the xorg-commit mailing list