[Mesa-dev] [PATCH 2/2] panfrost: Set bo->gem_handle when creating a linear BO

Tomeu Vizoso tomeu.vizoso at collabora.com
Mon Mar 11 12:40:29 UTC 2019


Signed-off-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
---
 src/gallium/drivers/panfrost/pan_resource.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/panfrost/pan_resource.c b/src/gallium/drivers/panfrost/pan_resource.c
index 1a6769b5508e..e398b6f6b7ce 100644
--- a/src/gallium/drivers/panfrost/pan_resource.c
+++ b/src/gallium/drivers/panfrost/pan_resource.c
@@ -260,6 +260,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 */
         }
@@ -335,6 +336,7 @@ panfrost_destroy_bo(struct panfrost_screen *screen, struct panfrost_bo *pbo)
                 struct panfrost_memory mem = {
                         .cpu = bo->cpu[0],
                         .gpu = bo->gpu[0],
+                        .gem_handle = bo->gem_handle,
                         .size = bo->imported_size
                 };
 
-- 
2.20.1



More information about the mesa-dev mailing list