From 8f04d6721fe0ac844fa66df3167a779bac236138 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Sat, 13 Feb 2016 08:46:58 +0000 Subject: [PATCH] sna/dri2: Initialize priv->cache_size Silence a valgrind warning, though it should have no runtime impace. Signed-off-by: Chris Wilson --- src/sna/kgem.c | 1 + src/sna/sna_dri2.c | 1 + 2 files changed, 2 insertions(+) diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 3656d5fc..f441396c 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -2910,6 +2910,7 @@ static void __kgem_bo_destroy(struct kgem *kgem, struct kgem_bo *bo) DBG(("%s: handle=%d, size=%d\n", __FUNCTION__, bo->handle, bytes(bo))); assert(list_is_empty(&bo->list)); + assert(list_is_empty(&bo->vma)); assert(bo->refcnt == 0); assert(bo->proxy == NULL); assert(bo->active_scanout == 0); diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index 045b12d6..fcfbd9d9 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -1519,6 +1519,7 @@ draw_current_msc(DrawablePtr draw, xf86CrtcPtr crtc, uint64_t msc) priv->msc_delta = 0; priv->chain = NULL; priv->scanout = -1; + priv->cache_size = 0; list_init(&priv->cache); dri2_window_attach((WindowPtr)draw, priv); }