summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
index 277603d1..6a28e657 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
@@ -3,7 +3,7 @@
3 * 3 *
4 * GK20A Fences 4 * GK20A Fences
5 * 5 *
6 * Copyright (c) 2014-2017, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2014-2018, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * Permission is hereby granted, free of charge, to any person obtaining a 8 * Permission is hereby granted, free of charge, to any person obtaining a
9 * copy of this software and associated documentation files (the "Software"), 9 * copy of this software and associated documentation files (the "Software"),
@@ -44,9 +44,10 @@ struct gk20a_fence {
44 /* Valid for all fence types: */ 44 /* Valid for all fence types: */
45 bool valid; 45 bool valid;
46 struct nvgpu_ref ref; 46 struct nvgpu_ref ref;
47 struct sync_fence *sync_fence;
48 const struct gk20a_fence_ops *ops; 47 const struct gk20a_fence_ops *ops;
49 48
49 struct sync_fence *os_fence;
50
50 /* Valid for fences created from semaphores: */ 51 /* Valid for fences created from semaphores: */
51 struct nvgpu_semaphore *semaphore; 52 struct nvgpu_semaphore *semaphore;
52 struct nvgpu_cond *semaphore_wq; 53 struct nvgpu_cond *semaphore_wq;
@@ -62,18 +63,16 @@ struct gk20a_fence {
62 63
63/* Fences can be created from semaphores or syncpoint (id, value) pairs */ 64/* Fences can be created from semaphores or syncpoint (id, value) pairs */
64int gk20a_fence_from_semaphore( 65int gk20a_fence_from_semaphore(
65 struct gk20a *g,
66 struct gk20a_fence *fence_out, 66 struct gk20a_fence *fence_out,
67 struct sync_timeline *timeline,
68 struct nvgpu_semaphore *semaphore, 67 struct nvgpu_semaphore *semaphore,
69 struct nvgpu_cond *semaphore_wq, 68 struct nvgpu_cond *semaphore_wq,
70 bool need_sync_fence); 69 struct sync_fence *os_fence);
71 70
72int gk20a_fence_from_syncpt( 71int gk20a_fence_from_syncpt(
73 struct gk20a_fence *fence_out, 72 struct gk20a_fence *fence_out,
74 struct nvgpu_nvhost_dev *nvhost_dev, 73 struct nvgpu_nvhost_dev *nvhost_dev,
75 u32 id, u32 value, 74 u32 id, u32 value,
76 bool need_sync_fence); 75 struct sync_fence *os_fence);
77 76
78int gk20a_alloc_fence_pool( 77int gk20a_alloc_fence_pool(
79 struct channel_gk20a *c, 78 struct channel_gk20a *c,
@@ -87,7 +86,7 @@ struct gk20a_fence *gk20a_alloc_fence(
87 86
88void gk20a_init_fence(struct gk20a_fence *f, 87void gk20a_init_fence(struct gk20a_fence *f,
89 const struct gk20a_fence_ops *ops, 88 const struct gk20a_fence_ops *ops,
90 struct sync_fence *sync_fence); 89 struct sync_fence *os_fence);
91 90
92/* Fence operations */ 91/* Fence operations */
93void gk20a_fence_put(struct gk20a_fence *f); 92void gk20a_fence_put(struct gk20a_fence *f);
@@ -95,6 +94,7 @@ struct gk20a_fence *gk20a_fence_get(struct gk20a_fence *f);
95int gk20a_fence_wait(struct gk20a *g, struct gk20a_fence *f, 94int gk20a_fence_wait(struct gk20a *g, struct gk20a_fence *f,
96 unsigned long timeout); 95 unsigned long timeout);
97bool gk20a_fence_is_expired(struct gk20a_fence *f); 96bool gk20a_fence_is_expired(struct gk20a_fence *f);
98int gk20a_fence_install_fd(struct gk20a_fence *f); 97bool gk20a_fence_is_valid(struct gk20a_fence *f);
98int gk20a_fence_install_fd(struct gk20a_fence *f, int fd);
99 99
100#endif 100#endif