panfrost: Set bo->gem_handle when creating a linear BO

So we can free it later.

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
This commit is contained in:
Tomeu Vizoso 2019-03-11 13:35:27 +01:00
parent bfbad30543
commit 56e04f67f9
1 changed files with 3 additions and 1 deletions

View File

@ -237,6 +237,7 @@ panfrost_create_bo(struct panfrost_screen *screen, const struct pipe_resource *t
bo->cpu[0] = mem.cpu;
bo->gpu[0] = mem.gpu;
bo->gem_handle = mem.gem_handle;
/* TODO: Mipmap */
}
@ -312,7 +313,8 @@ panfrost_destroy_bo(struct panfrost_screen *screen, struct panfrost_bo *pbo)
struct panfrost_memory mem = {
.cpu = bo->cpu[0],
.gpu = bo->gpu[0],
.size = bo->size[0]
.size = bo->size[0],
.gem_handle = bo->gem_handle,
};
screen->driver->free_slab(screen, &mem);