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

Chris Wilson ickle at kemper.freedesktop.org
Mon Sep 8 23:39:10 PDT 2014


 src/sna/sna_blt.c |   48 ++++++++++++++++++++++++++++++++++++------------
 1 file changed, 36 insertions(+), 12 deletions(-)

New commits:
commit faf0bdd477b9ec73f943c3101a3ae30fd6d579ea
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Sep 9 07:36:40 2014 +0100

    sna: Add some DBG spam for BLT boxes
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=77074
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_blt.c b/src/sna/sna_blt.c
index 17ed828..72f7f67 100644
--- a/src/sna/sna_blt.c
+++ b/src/sna/sna_blt.c
@@ -1111,7 +1111,9 @@ inline static void _sna_blt_fill_boxes(struct sna *sna,
 		rem = kgem_batch_space(kgem);
 		if (3*nbox_this_time > rem)
 			nbox_this_time = rem / 3;
-		assert(nbox_this_time);
+		DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+		     __FUNCTION__, nbox_this_time, nbox, rem));
+		assert(nbox_this_time > 0);
 		nbox -= nbox_this_time;
 
 		kgem->nbatch += 3 * nbox_this_time;
@@ -1208,7 +1210,9 @@ static void blt_composite_fill_boxes_no_offset__thread(struct sna *sna,
 		rem = kgem_batch_space(kgem);
 		if (3*nbox_this_time > rem)
 			nbox_this_time = rem / 3;
-		assert(nbox_this_time);
+		DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+		     __FUNCTION__, nbox_this_time, nbox, rem));
+		assert(nbox_this_time > 0);
 		nbox -= nbox_this_time;
 
 		kgem->nbatch += 3 * nbox_this_time;
@@ -1321,7 +1325,9 @@ static void blt_composite_fill_boxes__thread(struct sna *sna,
 		rem = kgem_batch_space(kgem);
 		if (3*nbox_this_time > rem)
 			nbox_this_time = rem / 3;
-		assert(nbox_this_time);
+		DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+		     __FUNCTION__, nbox_this_time, nbox, rem));
+		assert(nbox_this_time > 0);
 		nbox -= nbox_this_time;
 
 		kgem->nbatch += 3 * nbox_this_time;
@@ -1617,7 +1623,9 @@ static void blt_composite_copy_boxes__thread(struct sna *sna,
 				nbox_this_time = rem / 8;
 			if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 				nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-			assert(nbox_this_time);
+			DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+			     __FUNCTION__, nbox_this_time, nbox, rem));
+			assert(nbox_this_time > 0);
 			nbox -= nbox_this_time;
 
 			assert(sna->kgem.mode == KGEM_BLT);
@@ -1671,7 +1679,9 @@ static void blt_composite_copy_boxes__thread(struct sna *sna,
 				nbox_this_time = rem / 8;
 			if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 				nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-			assert(nbox_this_time);
+			DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+			     __FUNCTION__, nbox_this_time, nbox, rem));
+			assert(nbox_this_time > 0);
 			nbox -= nbox_this_time;
 
 			assert(sna->kgem.mode == KGEM_BLT);
@@ -1749,7 +1759,9 @@ static void blt_composite_copy_boxes__thread64(struct sna *sna,
 				nbox_this_time = rem / 10;
 			if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 				nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-			assert(nbox_this_time);
+			DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+			     __FUNCTION__, nbox_this_time, nbox, rem));
+			assert(nbox_this_time > 0);
 			nbox -= nbox_this_time;
 
 			assert(kgem->mode == KGEM_BLT);
@@ -1805,7 +1817,9 @@ static void blt_composite_copy_boxes__thread64(struct sna *sna,
 				nbox_this_time = rem / 10;
 			if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 				nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-			assert(nbox_this_time);
+			DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+			     __FUNCTION__, nbox_this_time, nbox, rem));
+			assert(nbox_this_time > 0);
 			nbox -= nbox_this_time;
 
 			assert(kgem->mode == KGEM_BLT);
@@ -3562,7 +3576,9 @@ bool sna_blt_fill_boxes(struct sna *sna, uint8_t alu,
 		rem = kgem_batch_space(kgem);
 		if (3*nbox_this_time > rem)
 			nbox_this_time = rem / 3;
-		assert(nbox_this_time);
+		DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+		     __FUNCTION__, nbox_this_time, nbox, rem));
+		assert(nbox_this_time > 0);
 		nbox -= nbox_this_time;
 
 		assert(sna->kgem.mode == KGEM_BLT);
@@ -3751,7 +3767,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
 					nbox_this_time = rem / 8;
 				if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 					nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-				assert(nbox_this_time);
+				DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+				     __FUNCTION__, nbox_this_time, nbox, rem));
+				assert(nbox_this_time > 0);
 				nbox -= nbox_this_time;
 
 				assert(sna->kgem.mode == KGEM_BLT);
@@ -3808,7 +3826,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
 					nbox_this_time = rem / 8;
 				if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 					nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-				assert(nbox_this_time);
+				DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+				     __FUNCTION__, nbox_this_time, nbox, rem));
+				assert(nbox_this_time > 0);
 				nbox -= nbox_this_time;
 
 				assert(sna->kgem.mode == KGEM_BLT);
@@ -3865,7 +3885,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
 					nbox_this_time = rem / 8;
 				if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 					nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-				assert(nbox_this_time);
+				DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+				     __FUNCTION__, nbox_this_time, nbox, rem));
+				assert(nbox_this_time > 0);
 				nbox -= nbox_this_time;
 
 				assert(sna->kgem.mode == KGEM_BLT);
@@ -3922,7 +3944,9 @@ bool sna_blt_copy_boxes(struct sna *sna, uint8_t alu,
 					nbox_this_time = rem / 8;
 				if (2*nbox_this_time > KGEM_RELOC_SIZE(kgem) - kgem->nreloc)
 					nbox_this_time = (KGEM_RELOC_SIZE(kgem) - kgem->nreloc)/2;
-				assert(nbox_this_time);
+				DBG(("%s: emitting %d boxes out of %d (batch space %d)\n",
+				     __FUNCTION__, nbox_this_time, nbox, rem));
+				assert(nbox_this_time > 0);
 				nbox -= nbox_this_time;
 
 				assert(sna->kgem.mode == KGEM_BLT);


More information about the xorg-commit mailing list