nvc0: do not set tiled mode on gart bo when fence debugging is used
authorMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 25 Jun 2013 11:34:15 +0000 (13:34 +0200)
committerMaarten Lankhorst <maarten.lankhorst@canonical.com>
Tue, 25 Jun 2013 11:34:15 +0000 (13:34 +0200)
Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com>
src/gallium/drivers/nvc0/nvc0_video.c
src/gallium/drivers/nvc0/nvc0_video_bsp.c
src/gallium/drivers/nvc0/nvc0_video_ppp.c
src/gallium/drivers/nvc0/nvc0_video_vp.c

index 462637b1a8b57a1147a416ee620929c40474f817..cf61804bd0f961d748a2bf771502dedc7a8a4182 100644 (file)
@@ -440,7 +440,7 @@ nvc0_create_decoder(struct pipe_context *context,
 
 #if NVC0_DEBUG_FENCE
    ret = nouveau_bo_new(screen->device, NOUVEAU_BO_GART|NOUVEAU_BO_MAP,
-                        0, 0x1000, &cfg, &dec->fence_bo);
+                        0, 0x1000, NULL, &dec->fence_bo);
    if (ret)
       goto fail;
 
@@ -450,36 +450,42 @@ nvc0_create_decoder(struct pipe_context *context,
    dec->comm = (struct comm *)(dec->fence_map + (COMM_OFFSET/sizeof(*dec->fence_map)));
 
    /* So lets test if the fence is working? */
+   PUSH_SPACE(push[0], 6);
+   PUSH_REFN (push[0], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
    BEGIN_NVC0(push[0], SUBC_BSP(0x240), 3);
    PUSH_DATAh(push[0], dec->fence_bo->offset);
    PUSH_DATA (push[0], dec->fence_bo->offset);
    PUSH_DATA (push[0], dec->fence_seq);
 
    BEGIN_NVC0(push[0], SUBC_BSP(0x304), 1);
-   PUSH_DATA (push[0], 1);
+   PUSH_DATA (push[0], 0);
    PUSH_KICK (push[0]);
 
+   PUSH_SPACE(push[1], 6);
+   PUSH_REFN (push[1], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
    BEGIN_NVC0(push[1], SUBC_VP(0x240), 3);
    PUSH_DATAh(push[1], (dec->fence_bo->offset + 0x10));
    PUSH_DATA (push[1], (dec->fence_bo->offset + 0x10));
    PUSH_DATA (push[1], dec->fence_seq);
 
    BEGIN_NVC0(push[1], SUBC_VP(0x304), 1);
-   PUSH_DATA (push[1], 1);
+   PUSH_DATA (push[1], 0);
    PUSH_KICK (push[1]);
 
+   PUSH_SPACE(push[2], 6);
+   PUSH_REFN (push[2], dec->fence_bo, NOUVEAU_BO_GART|NOUVEAU_BO_RDWR);
    BEGIN_NVC0(push[2], SUBC_PPP(0x240), 3);
    PUSH_DATAh(push[2], (dec->fence_bo->offset + 0x20));
    PUSH_DATA (push[2], (dec->fence_bo->offset + 0x20));
    PUSH_DATA (push[2], dec->fence_seq);
 
    BEGIN_NVC0(push[2], SUBC_PPP(0x304), 1);
-   PUSH_DATA (push[2], 1);
+   PUSH_DATA (push[2], 0);
    PUSH_KICK (push[2]);
 
    usleep(100);
-   while (dec->fence_seq > dec->fence_map[0] &&
-          dec->fence_seq > dec->fence_map[4] &&
+   while (dec->fence_seq > dec->fence_map[0] ||
+          dec->fence_seq > dec->fence_map[4] ||
           dec->fence_seq > dec->fence_map[8]) {
       debug_printf("%u: %u %u %u\n", dec->fence_seq, dec->fence_map[0], dec->fence_map[4], dec->fence_map[8]);
       usleep(100);
index 6fe5018cd38d9ec8208cbbb5bef6f96c32afee1c..09e78aa5059632b3af9a35477c217be4d10eaaa4 100644 (file)
@@ -406,7 +406,7 @@ nvc0_decoder_bsp(struct nvc0_decoder *dec, union pipe_desc desc,
       do {
          usleep(100);
          if ((spin++ & 0xff) == 0xff) {
-            debug_printf("%u: %u\n", dec->fence_seq, dec->fence_map[0]);
+            debug_printf("b%u: %u\n", dec->fence_seq, dec->fence_map[0]);
             dump_comm_bsp(dec->comm);
          }
       } while (dec->fence_seq > dec->fence_map[0]);
index b5369124129d848373a01220a7784f9a2c45fbaf..4eb5932e051cb9990fd1258c292115ad489f686e 100644 (file)
@@ -132,7 +132,7 @@ nvc0_decoder_ppp(struct nvc0_decoder *dec, union pipe_desc desc, struct nvc0_vid
       do {
          usleep(100);
          if ((spin++ & 0xff) == 0xff)
-            debug_printf("ppp%u: %u\n", dec->fence_seq, dec->fence_map[8]);
+            debug_printf("p%u: %u\n", dec->fence_seq, dec->fence_map[8]);
       } while (dec->fence_seq > dec->fence_map[8]);
    }
 #else
index 8b3f81b3ea8b4375766e39ad13c96911758c3602..eab544da2d34b234adddfb4e717203c30abdc927 100644 (file)
@@ -653,7 +653,7 @@ nvc0_decoder_vp(struct nvc0_decoder *dec, union pipe_desc desc,
       do {
          usleep(100);
          if ((spin++ & 0xff) == 0xff) {
-            debug_printf("vp%u: %u\n", dec->fence_seq, dec->fence_map[4]);
+            debug_printf("v%u: %u\n", dec->fence_seq, dec->fence_map[4]);
             dump_comm_vp(dec, dec->comm, comm_seq, inter_bo, slice_size << 8);
          }
       } while (dec->fence_seq > dec->fence_map[4]);