From 7dcef36f4c5209bdd472b7f30cf9314344d2708e Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Mon, 17 Dec 2007 00:46:30 +1100 Subject: nouveau: bump pushbuf size a little, so a "full" packet can fit --- src/mesa/drivers/dri/nouveau_winsys/nouveau_pushbuf.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'src/mesa/drivers') diff --git a/src/mesa/drivers/dri/nouveau_winsys/nouveau_pushbuf.c b/src/mesa/drivers/dri/nouveau_winsys/nouveau_pushbuf.c index a922300ff5..36f201712a 100644 --- a/src/mesa/drivers/dri/nouveau_winsys/nouveau_pushbuf.c +++ b/src/mesa/drivers/dri/nouveau_winsys/nouveau_pushbuf.c @@ -27,6 +27,8 @@ #include "nouveau_drmif.h" #include "nouveau_dma.h" +#define PB_RSVD_DWORDS 2 + int nouveau_pushbuf_init(struct nouveau_channel *chan) { @@ -72,7 +74,7 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan) if (!nvpb) goto out_realloc; - if (nvpb->base.remaining == nvpb->res->size / 4) + if (nvpb->base.remaining == (nvpb->res->size / 4) - PB_RSVD_DWORDS) return 0; nvchan->pb_tail = NULL; @@ -154,13 +156,13 @@ out_realloc: if (!nvpb) return -ENOMEM; - while (nouveau_resource_alloc(nvchan->pb_heap, 0x2000, NULL, + while (nouveau_resource_alloc(nvchan->pb_heap, 0x2100, NULL, &nvpb->res)) { nouveau_fence_flush(chan); } nvpb->base.channel = chan; - nvpb->base.remaining = nvpb->res->size / 4; + nvpb->base.remaining = (nvpb->res->size / 4) - PB_RSVD_DWORDS; nvpb->base.cur = &nvchan->pushbuf[nvpb->res->start/4]; nvchan->pb_tail = &nvpb->base; -- cgit v1.2.3