From ea455f0465e4c272ddc734a349aa87fc46d0f4c5 Mon Sep 17 00:00:00 2001 From: Lucas Stach Date: Fri, 11 Sep 2020 18:47:04 +0200 Subject: [PATCH] etnaviv: stop leaking the dummy texure descriptor BO MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Free the dummy texture descriptor BO on context destroy. Fixes: eda73d71277a (etnaviv: GC7000: Texture descriptors) Signed-off-by: Lucas Stach Reviewed-by: Guido Günther Reviewed-by: Christian Gmeiner Cc: Part-of: (cherry picked from commit 9d5ec7f6f2c480093b2880387acf4a892c1d28f3) --- .pick_status.json | 2 +- src/gallium/drivers/etnaviv/etnaviv_context.c | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.pick_status.json b/.pick_status.json index e187fc936c8..b0bcba44996 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2074,7 +2074,7 @@ "description": "etnaviv: stop leaking the dummy texure descriptor BO", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "master_sha": null, "because_sha": "eda73d71277a0dd9d7832da96c2aaca2dd513d4d" }, diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c index 4a5f13df4e1..3ace013a72d 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_context.c +++ b/src/gallium/drivers/etnaviv/etnaviv_context.c @@ -130,6 +130,9 @@ etna_context_destroy(struct pipe_context *pctx) } mtx_unlock(&ctx->lock); + if (ctx->dummy_desc_bo) + etna_bo_del(ctx->dummy_desc_bo); + if (ctx->dummy_rt) etna_bo_del(ctx->dummy_rt);