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

Submitted by Tomeu Vizoso on March 11, 2019, 12:40 p.m.

Details

Message ID 20190311124029.36792-3-tomeu.vizoso@collabora.com
State New
Headers show

Not browsing as part of any series.

Commit Message

Tomeu Vizoso March 11, 2019, 12:40 p.m.
Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
---
 src/gallium/drivers/panfrost/pan_resource.c | 2 ++
 1 file changed, 2 insertions(+)

Patch hide | download patch | download mbox

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
                 };