summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/panfrost/pan_screen.c
diff options
context:
space:
mode:
authorTomeu Vizoso <[email protected]>2019-03-08 10:27:07 +0100
committerAlyssa Rosenzweig <[email protected]>2019-03-10 19:09:23 +0000
commit756f7b99895404bc7d7ce0cfcd84044cc21a799f (patch)
tree10eb58e22224f67c6c904aa7243404e6aada1fe3 /src/gallium/drivers/panfrost/pan_screen.c
parentd4dc79df72e05346b4dd40d19e346ada9e4af98c (diff)
panfrost: Add backend targeting the DRM driver
This backend interacts with the new DRM driver for Midgard GPUs which is currently in development. When using this backend, Panfrost has roughly on-par functionality as when using the non-DRM driver from Arm. Alyssa Rosenzweig: To do so, we implement additional routines for runtime GPU version detection and fencing. We cleanup some duplicate code interfering with the new driver. We fix a long-standing memory leak which is aggravated on the new driver. Finally, we implement BO import/export in a way compatible with the new driver. These changes are squashed to preserve bisectability given the hard-to-track ABI shifts in the nondrm module Signed-off-by: Tomeu Vizoso <[email protected]> Reviewed-by: Alyssa Rosenzweig <[email protected]>
Diffstat (limited to 'src/gallium/drivers/panfrost/pan_screen.c')
-rw-r--r--src/gallium/drivers/panfrost/pan_screen.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/gallium/drivers/panfrost/pan_screen.c b/src/gallium/drivers/panfrost/pan_screen.c
index b8a119fd343..b7f2e4bb2e9 100644
--- a/src/gallium/drivers/panfrost/pan_screen.c
+++ b/src/gallium/drivers/panfrost/pan_screen.c
@@ -500,21 +500,22 @@ panfrost_get_timestamp(struct pipe_screen *_screen)
}
static void
-panfrost_fence_reference(struct pipe_screen *screen,
+panfrost_fence_reference(struct pipe_screen *pscreen,
struct pipe_fence_handle **ptr,
struct pipe_fence_handle *fence)
{
- *ptr = fence;
+ struct panfrost_screen *screen = pan_screen(pscreen);
+ screen->driver->fence_reference(pscreen, ptr, fence);
}
static boolean
-panfrost_fence_finish(struct pipe_screen *screen,
+panfrost_fence_finish(struct pipe_screen *pscreen,
struct pipe_context *ctx,
struct pipe_fence_handle *fence,
uint64_t timeout)
{
- assert(fence);
- return TRUE;
+ struct panfrost_screen *screen = pan_screen(pscreen);
+ return screen->driver->fence_finish(pscreen, ctx, fence, timeout);
}
static const void *