From cbb3ae3dab9dc82d95524726135b8d6ef86bcf27 Mon Sep 17 00:00:00 2001 From: Ben Skeggs Date: Wed, 19 Aug 2009 15:55:05 +1000 Subject: nouveau: fix a thinko in copyless pushbuf ioctl No idea why G80 doesn't hit this, but, this fixes at least one NV40 card. --- libdrm/nouveau/nouveau_pushbuf.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libdrm/nouveau/nouveau_pushbuf.c b/libdrm/nouveau/nouveau_pushbuf.c index 86d5a4e3..1192e228 100644 --- a/libdrm/nouveau/nouveau_pushbuf.c +++ b/libdrm/nouveau/nouveau_pushbuf.c @@ -267,6 +267,8 @@ nouveau_pushbuf_flush(struct nouveau_channel *chan, unsigned min) *(nvpb->base.cur++) = nvpb->cal_suffix0; *(nvpb->base.cur++) = nvpb->cal_suffix1; + if (nvpb->base.remaining > 2) /* space() will fixup if not */ + nvpb->base.remaining -= 2; req.channel = chan->id; req.handle = nvpb->buffer[nvpb->current]->handle; -- cgit v1.2.3