summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 25e4cb4)
raw | patch | inline | side by side (from parent 1: 25e4cb4)
author | Marcin Slusarz <marcin.slusarz@gmail.com> | |
Sat, 9 Jun 2012 18:56:37 +0000 (20:56 +0200) | ||
committer | Marcin Slusarz <marcin.slusarz@gmail.com> | |
Sat, 9 Jun 2012 21:23:32 +0000 (23:23 +0200) |
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>
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>
nouveau/abi16.c | patch | blob | history | |
nouveau/pushbuf.c | patch | blob | history |
diff --git a/nouveau/abi16.c b/nouveau/abi16.c
index 69a0a9b3cd8a8840609a14748cbda9348a4f67f1..a67fbc123a97cba5025cc4347adca6b75d3d5d5f 100644 (file)
--- a/nouveau/abi16.c
+++ b/nouveau/abi16.c
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 7b9dbaade2c0c39ca5d5a5b6930f71e57be8481d..0e37ce3d2a834560b2971976fb0846ba00096b8a 100644 (file)
--- a/nouveau/pushbuf.c
+++ b/nouveau/pushbuf.c
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);
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)