aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nvc0/nvc0_video.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gallium/drivers/nvc0/nvc0_video.c')
-rw-r--r--src/gallium/drivers/nvc0/nvc0_video.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/gallium/drivers/nvc0/nvc0_video.c b/src/gallium/drivers/nvc0/nvc0_video.c
index 462637b1a8b..cf61804bd0f 100644
--- a/src/gallium/drivers/nvc0/nvc0_video.c
+++ b/src/gallium/drivers/nvc0/nvc0_video.c
@@ -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);