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);
+ nouveau_pushbuf_space(push[0], 6, 1, 0);
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], 0);
PUSH_KICK (push[0]);
- PUSH_SPACE(push[1], 6);
+ nouveau_pushbuf_space(push[1], 6, 1, 0);
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], 0);
PUSH_KICK (push[1]);
- PUSH_SPACE(push[2], 6);
+ nouveau_pushbuf_space(push[2], 6, 1, 0);
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));
};
int num_refs = sizeof(bo_refs)/sizeof(*bo_refs);
+ if (!dec->bitplane_bo)
+ num_refs--;
+
#ifdef NVC0_DEBUG_FENCE
fence_extra = 4;
#endif
nvc0_decoder_vp_caps(dec, desc, target, comm_seq, vp_caps, is_ref, refs);
- PUSH_SPACE(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 7) + fence_extra + 2);
- if (!dec->bitplane_bo)
- num_refs--;
+ nouveau_pushbuf_space(push, 6 + (codec == PIPE_VIDEO_CODEC_MPEG4_AVC ? 9 : 7) + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);
caps |= 0 << 16; // reset struct comm if flag is set
if (!is_ref)
nvc0_decoder_kick_ref(dec, target);
- PUSH_SPACE(push, 8 + 3 * (codec != PIPE_VIDEO_CODEC_MPEG12) +
- 6 + codec_extra + fence_extra + 2);
+ nouveau_pushbuf_space(push, 8 + 3 * (codec != PIPE_VIDEO_CODEC_MPEG12) +
+ 6 + codec_extra + fence_extra + 2, num_refs, 0);
nouveau_pushbuf_refn(push, bo_refs, num_refs);