Lines Matching refs:fence
46 etna_fence_destroy(struct pipe_fence_handle *fence) in etna_fence_destroy() argument
48 if (fence->fence_fd != -1) in etna_fence_destroy()
49 close(fence->fence_fd); in etna_fence_destroy()
50 FREE(fence); in etna_fence_destroy()
56 struct pipe_fence_handle *fence) in etna_screen_fence_reference() argument
58 if (pipe_reference(&(*ptr)->reference, &fence->reference)) in etna_screen_fence_reference()
61 *ptr = fence; in etna_screen_fence_reference()
66 struct pipe_fence_handle *fence, uint64_t timeout) in etna_screen_fence_finish() argument
68 if (fence->fence_fd != -1) in etna_screen_fence_finish()
69 return !sync_wait(fence->fence_fd, timeout / 1000000); in etna_screen_fence_finish()
71 if (etna_pipe_wait_ns(fence->screen->pipe, fence->timestamp, timeout)) in etna_screen_fence_finish()
103 struct pipe_fence_handle *fence; in etna_fence_create() local
106 fence = CALLOC_STRUCT(pipe_fence_handle); in etna_fence_create()
107 if (!fence) in etna_fence_create()
110 pipe_reference_init(&fence->reference, 1); in etna_fence_create()
112 fence->ctx = ctx; in etna_fence_create()
113 fence->screen = ctx->screen; in etna_fence_create()
114 fence->timestamp = etna_cmd_stream_timestamp(ctx->stream); in etna_fence_create()
115 fence->fence_fd = fence_fd; in etna_fence_create()
117 return fence; in etna_fence_create()