summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc4/vc4_screen.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2017-05-08 16:46:59 -0700
committerEric Anholt <[email protected]>2017-05-17 14:18:26 -0700
commit50e78cd04f6b40c4cf02774861380d843b00ebb9 (patch)
tree9cd2b689ae2bee865109b7b563d06c84ec9eb502 /src/gallium/drivers/vc4/vc4_screen.c
parent76e4ab57158de8a568572f1acb1d679ce8abb288 (diff)
vc4: Drop pointless indirections around BO import/export.
I've since found them to be more confusing by adding indirections than clarifying by screening off resources from the handle/fd import/export process.
Diffstat (limited to 'src/gallium/drivers/vc4/vc4_screen.c')
-rw-r--r--src/gallium/drivers/vc4/vc4_screen.c54
1 files changed, 0 insertions, 54 deletions
diff --git a/src/gallium/drivers/vc4/vc4_screen.c b/src/gallium/drivers/vc4/vc4_screen.c
index 18b47ae1384..0d3eb3ce237 100644
--- a/src/gallium/drivers/vc4/vc4_screen.c
+++ b/src/gallium/drivers/vc4/vc4_screen.c
@@ -660,57 +660,3 @@ fail:
ralloc_free(pscreen);
return NULL;
}
-
-boolean
-vc4_screen_bo_get_handle(struct pipe_screen *pscreen,
- struct vc4_bo *bo,
- unsigned stride,
- struct winsys_handle *whandle)
-{
- whandle->stride = stride;
-
- /* If we're passing some reference to our BO out to some other part of
- * the system, then we can't do any optimizations about only us being
- * the ones seeing it (like BO caching or shadow update avoidance).
- */
- bo->private = false;
-
- switch (whandle->type) {
- case DRM_API_HANDLE_TYPE_SHARED:
- return vc4_bo_flink(bo, &whandle->handle);
- case DRM_API_HANDLE_TYPE_KMS:
- whandle->handle = bo->handle;
- return TRUE;
- case DRM_API_HANDLE_TYPE_FD:
- whandle->handle = vc4_bo_get_dmabuf(bo);
- return whandle->handle != -1;
- }
-
- return FALSE;
-}
-
-struct vc4_bo *
-vc4_screen_bo_from_handle(struct pipe_screen *pscreen,
- struct winsys_handle *whandle)
-{
- struct vc4_screen *screen = vc4_screen(pscreen);
-
- if (whandle->offset != 0) {
- fprintf(stderr,
- "Attempt to import unsupported winsys offset %u\n",
- whandle->offset);
- return NULL;
- }
-
- switch (whandle->type) {
- case DRM_API_HANDLE_TYPE_SHARED:
- return vc4_bo_open_name(screen, whandle->handle, whandle->stride);
- case DRM_API_HANDLE_TYPE_FD:
- return vc4_bo_open_dmabuf(screen, whandle->handle, whandle->stride);
- default:
- fprintf(stderr,
- "Attempt to import unsupported handle type %d\n",
- whandle->type);
- return NULL;
- }
-}