summaryrefslogtreecommitdiff
path: root/libdrm
diff options
context:
space:
mode:
authorBen Skeggs <bskeggs@redhat.com>2009-08-19 15:55:05 +1000
committerBen Skeggs <bskeggs@redhat.com>2009-08-19 15:56:24 +1000
commitcbb3ae3dab9dc82d95524726135b8d6ef86bcf27 (patch)
tree88c56dea7cfce82b82289a00aa0539cd8b63d96e /libdrm
parent8c43b79b21929e9e54e13e892f7787e222e73f39 (diff)
nouveau: fix a thinko in copyless pushbuf ioctl
No idea why G80 doesn't hit this, but, this fixes at least one NV40 card.
Diffstat (limited to 'libdrm')
-rw-r--r--libdrm/nouveau/nouveau_pushbuf.c2
1 files changed, 2 insertions, 0 deletions
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;