aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarcin Slusarz2012-06-09 13:56:37 -0500
committerMarcin Slusarz2012-06-09 16:23:32 -0500
commit9e0026d35c56374b53a0b3837e24412bc9a4d8c9 (patch)
tree361b197771e1669f0414a1047a7db00dcefb354c /nouveau
parent25e4cb4659c62817aae2ca3b83f2d4f598d6474b (diff)
downloadlibdrm-9e0026d35c56374b53a0b3837e24412bc9a4d8c9.tar.gz
libdrm-9e0026d35c56374b53a0b3837e24412bc9a4d8c9.tar.xz
libdrm-9e0026d35c56374b53a0b3837e24412bc9a4d8c9.zip
nouveau: silence some remaining valgrind warnings
Valgrind can't understand some of the fields passed to ioctls are overwritten by kernel, so we need to initialize them. Almost all of our ioctl wrappers already do it and the cost of remaining 3 is very small. Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Diffstat (limited to 'nouveau')
-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
31abi16_chan_nv04(struct nouveau_object *obj) 31abi16_chan_nv04(struct nouveau_object *obj)
32{ 32{
33 struct nouveau_device *dev = (struct nouveau_device *)obj->parent; 33 struct nouveau_device *dev = (struct nouveau_device *)obj->parent;
34 struct drm_nouveau_channel_alloc req;
35 struct nv04_fifo *nv04 = obj->data; 34 struct nv04_fifo *nv04 = obj->data;
35 struct drm_nouveau_channel_alloc req = {nv04->vram, nv04->gart};
36 int ret; 36 int ret;
37 37
38 req.fb_ctxdma_handle = nv04->vram;
39 req.tt_ctxdma_handle = nv04->gart;
40
41 ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_CHANNEL_ALLOC, 38 ret = drmCommandWriteRead(dev->fd, DRM_NOUVEAU_CHANNEL_ALLOC,
42 &req, sizeof(req)); 39 &req, sizeof(req));
43 if (ret) 40 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)
336 req.push = (uint64_t)(unsigned long)krec->push; 336 req.push = (uint64_t)(unsigned long)krec->push;
337 req.suffix0 = nvpb->suffix0; 337 req.suffix0 = nvpb->suffix0;
338 req.suffix1 = nvpb->suffix1; 338 req.suffix1 = nvpb->suffix1;
339 req.vram_available = 0; /* for valgrind */
340 req.gart_available = 0;
339 341
340 if (dbg_on(0)) 342 if (dbg_on(0))
341 pushbuf_dump(krec, krec_id++, fifo->channel); 343 pushbuf_dump(krec, krec_id++, fifo->channel);
@@ -534,7 +536,7 @@ nouveau_pushbuf_new(struct nouveau_client *client, struct nouveau_object *chan,
534 struct nouveau_fifo *fifo = chan->data; 536 struct nouveau_fifo *fifo = chan->data;
535 struct nouveau_pushbuf_priv *nvpb; 537 struct nouveau_pushbuf_priv *nvpb;
536 struct nouveau_pushbuf *push; 538 struct nouveau_pushbuf *push;
537 struct drm_nouveau_gem_pushbuf req; 539 struct drm_nouveau_gem_pushbuf req = {};
538 int ret; 540 int ret;
539 541
540 if (chan->oclass != NOUVEAU_FIFO_CHANNEL_CLASS) 542 if (chan->oclass != NOUVEAU_FIFO_CHANNEL_CLASS)