summaryrefslogtreecommitdiff
path: root/src/sna/sna_display.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-11-08 11:25:14 +0000
committerChris Wilson <chris@chris-wilson.co.uk>2011-11-08 18:12:04 +0000
commit3620cd2d157f3d81ccb76bce2ab813bd1e058878 (patch)
tree2dfa40305de48cec77bf9c985fd804d89a37a2fd /src/sna/sna_display.c
parentaeaadb16093f83c9b830958c5946d4d048ffd26b (diff)
sna: Begin hooking up valgrind/memcheck
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/sna/sna_display.c')
-rw-r--r--src/sna/sna_display.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/sna/sna_display.c b/src/sna/sna_display.c
index d44d6f8b..e8d2c2a5 100644
--- a/src/sna/sna_display.c
+++ b/src/sna/sna_display.c
@@ -146,6 +146,7 @@ static uint32_t gem_create(int fd, int size)
{
struct drm_i915_gem_create create;
+ VG_CLEAR(create);
create.handle = 0;
create.size = ALIGN(size, 4096);
(void)drmIoctl(fd, DRM_IOCTL_I915_GEM_CREATE, &create);
@@ -157,6 +158,7 @@ static void gem_close(int fd, uint32_t handle)
{
struct drm_gem_close close;
+ VG_CLEAR(close);
close.handle = handle;
(void)drmIoctl(fd, DRM_IOCTL_GEM_CLOSE, &close);
}
@@ -483,7 +485,7 @@ static struct kgem_bo *sna_create_bo_for_fbcon(struct sna *sna,
* using a normal bo and so that when we call gem_close on it we
* delete our reference and not fbcon's!
*/
- memset(&flink, 0, sizeof(flink));
+ VG_CLEAR(flink);
flink.handle = fbcon->handle;
ret = drmIoctl(sna->kgem.fd, DRM_IOCTL_GEM_FLINK, &flink);
if (ret)
@@ -707,6 +709,7 @@ sna_crtc_load_cursor_argb(xf86CrtcPtr crtc, CARD32 *image)
struct sna_crtc *sna_crtc = crtc->driver_private;
struct drm_i915_gem_pwrite pwrite;
+ VG_CLEAR(pwrite);
pwrite.handle = sna_crtc->cursor;
pwrite.offset = 0;
pwrite.size = 64*64*4;
@@ -859,6 +862,7 @@ sna_crtc_init(ScrnInfoPtr scrn, struct sna_mode *mode, int num)
sna_crtc->id = mode_crtc->crtc_id;
drmModeFreeCrtc(mode_crtc);
+ VG_CLEAR(get_pipe);
get_pipe.pipe = 0;
get_pipe.crtc_id = sna_crtc->id;
drmIoctl(sna->kgem.fd,