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

Chris Wilson ickle at kemper.freedesktop.org
Tue Apr 22 04:32:19 PDT 2014


 src/sna/kgem.c |    9 +++++++++
 1 file changed, 9 insertions(+)

New commits:
commit b12bc035fb8ee40bb382e66604e869b729270189
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Apr 22 12:30:29 2014 +0100

    sna: Add a DBG aide to disable hardware execution
    
    Submit a dummy batch so that we still build, submit batches and perform
    relocations, but do not actually invoke the GPU. This can be useful when
    looking at mysterious hardware hangs.
    
    References: https://bugs.freedesktop.org/show_bug.cgi?id=77263
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/kgem.c b/src/sna/kgem.c
index 5d77799..82199a1 100644
--- a/src/sna/kgem.c
+++ b/src/sna/kgem.c
@@ -61,6 +61,7 @@ static struct kgem_bo *
 search_snoop_cache(struct kgem *kgem, unsigned int num_pages, unsigned flags);
 
 #define DBG_NO_HW 0
+#define DBG_NO_EXEC 0
 #define DBG_NO_TILING 0
 #define DBG_NO_CACHE 0
 #define DBG_NO_CACHE_LEVEL 0
@@ -2743,6 +2744,14 @@ static int kgem_batch_write(struct kgem *kgem, uint32_t handle, uint32_t size)
 
 	ASSERT_IDLE(kgem, handle);
 
+#if DBG_NO_EXEC
+	{
+		uint32_t batch[] = { MI_BATCH_BUFFER_END, 0};
+		return gem_write(kgem->fd, handle, 0, sizeof(batch), batch);
+	}
+#endif
+
+
 retry:
 	/* If there is no surface data, just upload the batch */
 	if (kgem->surface == kgem->batch_size) {


More information about the xorg-commit mailing list