summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/vc5/vc5_bufmgr.c
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2018-04-04 09:59:18 -0700
committerEric Anholt <[email protected]>2018-04-12 11:20:50 -0700
commitb225cdceccb225329298763baa302a9332288b18 (patch)
treeec5f10c51250de4a64acf94a8bbb4a8d1bca014c /src/gallium/drivers/vc5/vc5_bufmgr.c
parentd9c525ed2240ff450f36a5d83c9c2c66087cd2bb (diff)
broadcom/vc5: Update the UABI for in/out syncobjs
This is the ABI I'm hoping to stabilize for merging the driver. seqnos are eliminated, which allows for the GPU scheduler to task-switch between DRM fds even after submission to the kernel. In/out sync objects are introduced, to allow the Android fencing extension (not yet implemented, but should be trivial), and to also allow the driver to tell the kernel to not start a bin until a previous render is complete.
Diffstat (limited to 'src/gallium/drivers/vc5/vc5_bufmgr.c')
-rw-r--r--src/gallium/drivers/vc5/vc5_bufmgr.c38
1 files changed, 0 insertions, 38 deletions
diff --git a/src/gallium/drivers/vc5/vc5_bufmgr.c b/src/gallium/drivers/vc5/vc5_bufmgr.c
index bced512ae0d..7a9c04a268d 100644
--- a/src/gallium/drivers/vc5/vc5_bufmgr.c
+++ b/src/gallium/drivers/vc5/vc5_bufmgr.c
@@ -451,44 +451,6 @@ vc5_bo_flink(struct vc5_bo *bo, uint32_t *name)
return true;
}
-static int vc5_wait_seqno_ioctl(int fd, uint64_t seqno, uint64_t timeout_ns)
-{
- struct drm_vc5_wait_seqno wait = {
- .seqno = seqno,
- .timeout_ns = timeout_ns,
- };
- int ret = vc5_ioctl(fd, DRM_IOCTL_VC5_WAIT_SEQNO, &wait);
- if (ret == -1)
- return -errno;
- else
- return 0;
-
-}
-
-bool
-vc5_wait_seqno(struct vc5_screen *screen, uint64_t seqno, uint64_t timeout_ns,
- const char *reason)
-{
- if (unlikely(V3D_DEBUG & V3D_DEBUG_PERF) && timeout_ns && reason) {
- if (vc5_wait_seqno_ioctl(screen->fd, seqno, 0) == -ETIME) {
- fprintf(stderr, "Blocking on seqno %lld for %s\n",
- (long long)seqno, reason);
- }
- }
-
- int ret = vc5_wait_seqno_ioctl(screen->fd, seqno, timeout_ns);
- if (ret) {
- if (ret != -ETIME) {
- fprintf(stderr, "wait failed: %d\n", ret);
- abort();
- }
-
- return false;
- }
-
- return true;
-}
-
static int vc5_wait_bo_ioctl(int fd, uint32_t handle, uint64_t timeout_ns)
{
struct drm_vc5_wait_bo wait = {