summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVille Syrjälä <ville.syrjala@linux.intel.com>2019-04-17 20:59:23 +0300
committerVille Syrjälä <ville.syrjala@linux.intel.com>2019-04-18 21:13:45 +0300
commitc211f23a785124f44ab1d217805c1f1fb11f1f13 (patch)
tree27fd24635239644700fc82210a6317d8a27287d2
parenta765aa108105804c19096554447ad0cb71f64fc3 (diff)
lib/igt_fb: Unref the renderecopy scratch bos
We're currently leaking all the temporary bos we construct for rendercopy. That doesn't go so well when trying to test with 1GiB framebuffers. v2: Add fini_buf() (Chris) Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r--lib/igt_fb.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/igt_fb.c b/lib/igt_fb.c
index 6a43fcc4..766e504d 100644
--- a/lib/igt_fb.c
+++ b/lib/igt_fb.c
@@ -1628,6 +1628,11 @@ static void init_buf(struct fb_blit_upload *blit,
}
}
+static void fini_buf(struct igt_buf *buf)
+{
+ drm_intel_bo_unreference(buf->bo);
+}
+
static void rendercopy(struct fb_blit_upload *blit,
const struct igt_fb *dst_fb,
const struct igt_fb *src_fb)
@@ -1647,6 +1652,9 @@ static void rendercopy(struct fb_blit_upload *blit,
render_copy(blit->batch, NULL,
&src, 0, 0, dst_fb->plane_width[0], dst_fb->plane_height[0],
&dst, 0, 0);
+
+ fini_buf(&dst);
+ fini_buf(&src);
}
static void blitcopy(const struct igt_fb *dst_fb,