From 7cbf0a410e565b6a02c4b45f73364d3537780105 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 4 Jun 2013 13:25:38 +0800 Subject: [PATCH] ilo: unmap cp bo before destroying it The BOs are mapped in their entire life times for the chipsets we support so do not forget to unmap it. --- src/gallium/drivers/ilo/ilo_cp.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/ilo/ilo_cp.c b/src/gallium/drivers/ilo/ilo_cp.c index 1fd47410bcd..b29a014591c 100644 --- a/src/gallium/drivers/ilo/ilo_cp.c +++ b/src/gallium/drivers/ilo/ilo_cp.c @@ -256,8 +256,13 @@ ilo_cp_flush(struct ilo_cp *cp) void ilo_cp_destroy(struct ilo_cp *cp) { - if (cp->bo) + if (cp->bo) { + if (!cp->sys) + cp->bo->unmap(cp->bo); + cp->bo->unreference(cp->bo); + } + if (cp->render_ctx) cp->winsys->destroy_context(cp->winsys, cp->render_ctx); -- 2.30.2