summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nouveau/abi16.c5
-rw-r--r--nouveau/pushbuf.c4
2 files changed, 4 insertions, 5 deletions
diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index 69a0a9b3..a67fbc12 100644
--- a/nouveau/abi16.c
+++ b/nouveau/abi16.c
@@ -31,13 +31,10 @@ int
abi16_chan_nv04(struct nouveau_object *obj)
{
struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
- struct drm_nouveau_channel_alloc req;
struct nv04_fifo *nv04 = obj->data;
+ struct drm_nouveau_channel_alloc req = {nv04->vram, nv04->gart};
int ret;
- req.fb_ctxdma_handle = nv04->vram;
- req.tt_ctxdma_handle = nv04->gart;
-
ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_CHANNEL_ALLOC,
&req, sizeof(req));
if (ret)
diff --git a/nouveau/pushbuf.c b/nouveau/pushbuf.c
index 7b9dbaad..0e37ce3d 100644
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
@@ -336,6 +336,8 @@ pushbuf_submit(struct nouveau_pushbuf *push, struct nouveau_object *chan)
req.push = (uint64_t)(unsigned long)krec->push;
req.suffix0 = nvpb->suffix0;
req.suffix1 = nvpb->suffix1;
+ req.vram_available = 0; /* for valgrind */
+ req.gart_available = 0;
if (dbg_on(0))
pushbuf_dump(krec, krec_id++, fifo->channel);
@@ -534,7 +536,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
struct nouveau_fifo *fifo = chan->data;
struct nouveau_pushbuf_priv *nvpb;
struct nouveau_pushbuf *push;
- struct drm_nouveau_gem_pushbuf req;
+ struct drm_nouveau_gem_pushbuf req = {};
int ret;
if (chan->oclass != NOUVEAU_FIFO_CHANNEL_CLASS)