nouveau: add debug option to sync pushbuffer submissions
authorKarol Herbst <kherbst@redhat.com>
Wed, 5 May 2021 12:14:30 +0000 (14:14 +0200)
committerKarol Herbst <kherbst@redhat.com>
Thu, 6 May 2021 17:41:16 +0000 (19:41 +0200)
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
nouveau/private.h
nouveau/pushbuf.c

index dcc23d1..b81d4b1 100644 (file)
@@ -13,6 +13,7 @@
 
 /*
  * 0x00000001 dump all pushbuffers
+ * 0x00000002 submit pushbuffers synchronously
  * 0x80000000 if compiled with SIMULATE return -EINVAL for all pb submissions
  */
 drm_private extern uint32_t nouveau_debug;
index 7f1ed8c..10ff3f5 100644 (file)
@@ -339,6 +339,8 @@ pushbuf_submit(struct nouveau_pushbuf *push, struct nouveau_object *chan)
                req.suffix0 = nvpb->suffix0;
                req.suffix1 = nvpb->suffix1;
                req.vram_available = 0; /* for valgrind */
+               if (dbg_on(1))
+                       req.vram_available |= NOUVEAU_GEM_PUSHBUF_SYNC;
                req.gart_available = 0;
 
                if (dbg_on(0))