xf86-video-intel: configure.ac src/sna/kgem.c src/sna/sna_driver.c src/sna/sna.h

Chris Wilson ickle at kemper.freedesktop.org
Sun Jan 20 02:18:00 PST 2013


 configure.ac         |    3 +++
 src/sna/kgem.c       |    6 +++++-
 src/sna/sna.h        |    1 -
 src/sna/sna_driver.c |    4 ++++
 4 files changed, 12 insertions(+), 2 deletions(-)

New commits:
commit 9329d8755981989ccbe66df6085fbab7c809a2c6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Jan 20 10:14:21 2013 +0000

    sna: Make DEBUG_SYNC a configure option
    
    As it is advisable to combined the synchronous rendering debug option
    with other debugging options, it is more convenient to make it into a
    configure option: --enable-debug=sync
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/configure.ac b/configure.ac
index ff26462..e93fd88 100644
--- a/configure.ac
+++ b/configure.ac
@@ -418,6 +418,9 @@ if test "x$DEBUG" != xno; then
 		AC_DEFINE([HAVE_VALGRIND], 1, [Use valgrind intrinsics to suppress false warnings])
 	fi
 fi
+if test "x$DEBUG" = xsync; then
+	AC_DEFINE(DEBUG_SYNC,1,[Enable synchronous rendering for debugging])
+fi
 if test "x$DEBUG" = xmemory; then
 	AC_DEFINE(DEBUG_MEMORY,1,[Enable memory debugging])
 fi
diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 89558af..49815e7 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -75,6 +75,10 @@ search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
 #define DBG_NO_HANDLE_LUT 0
 #define DBG_DUMP 0
 
+#ifndef DEBUG_SYNC
+#define DEBUG_SYNC 0
+#endif
+
 #define SHOW_BATCH 0
 
 #ifndef USE_FASTRELOC
@@ -2650,7 +2654,7 @@ void _kgem_submit(struct kgem *kgem)
 				ret = 0;
 			}
 
-			if (DEBUG_FLUSH_SYNC && ret == 0) {
+			if (DEBUG_SYNC && ret == 0) {
 				struct drm_i915_gem_set_domain set_domain;
 
 				DBG(("%s: debug sync, starting\n", __FUNCTION__));
diff --git a/src/sna/sna.h b/src/sna/sna.h
index 8304f42..2ba5fe4 100644
--- a/src/sna/sna.h
+++ b/src/sna/sna.h
@@ -82,7 +82,6 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #define DEBUG_NO_BLT 0
 
 #define DEBUG_FLUSH_BATCH 0
-#define DEBUG_FLUSH_SYNC 0
 
 #define TEST_ALL 0
 #define TEST_ACCEL (TEST_ALL || 0)
diff --git a/src/sna/sna_driver.c b/src/sna/sna_driver.c
index dff2901..a0707ed 100644
--- a/src/sna/sna_driver.c
+++ b/src/sna/sna_driver.c
@@ -1141,6 +1141,10 @@ Bool sna_init_scrn(ScrnInfoPtr scrn, int entity_num)
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
 		   "SNA compiled with assertions enabled\n");
 #endif
+#if DEBUG_SYNC
+	xf86DrvMsg(scrn->scrnIndex, X_INFO,
+		   "SNA compiled with synchronous rendering\n");
+#endif
 #if DEBUG_MEMORY
 	xf86DrvMsg(scrn->scrnIndex, X_INFO,
 		   "SNA compiled with memory allocation reporting enabled\n");


More information about the xorg-commit mailing list