diff options
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.h | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c index fe38ae57..23522882 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c | |||
@@ -98,8 +98,8 @@ int gk20a_fence_install_fd(struct gk20a_fence *f) | |||
98 | #endif | 98 | #endif |
99 | } | 99 | } |
100 | 100 | ||
101 | static struct gk20a_fence *alloc_fence(const struct gk20a_fence_ops *ops, | 101 | struct gk20a_fence *gk20a_alloc_fence(const struct gk20a_fence_ops *ops, |
102 | struct sync_fence *sync_fence, bool wfi) | 102 | struct sync_fence *sync_fence, bool wfi) |
103 | { | 103 | { |
104 | struct gk20a_fence *f = kzalloc(sizeof(*f), GFP_KERNEL); | 104 | struct gk20a_fence *f = kzalloc(sizeof(*f), GFP_KERNEL); |
105 | if (!f) | 105 | if (!f) |
@@ -161,7 +161,7 @@ struct gk20a_fence *gk20a_fence_from_semaphore( | |||
161 | return NULL; | 161 | return NULL; |
162 | #endif | 162 | #endif |
163 | 163 | ||
164 | f = alloc_fence(&gk20a_semaphore_fence_ops, sync_fence, wfi); | 164 | f = gk20a_alloc_fence(&gk20a_semaphore_fence_ops, sync_fence, wfi); |
165 | if (!f) { | 165 | if (!f) { |
166 | #ifdef CONFIG_SYNC | 166 | #ifdef CONFIG_SYNC |
167 | sync_fence_put(sync_fence); | 167 | sync_fence_put(sync_fence); |
@@ -216,7 +216,7 @@ struct gk20a_fence *gk20a_fence_from_syncpt(struct platform_device *host1x_pdev, | |||
216 | } | 216 | } |
217 | #endif | 217 | #endif |
218 | 218 | ||
219 | f = alloc_fence(&gk20a_syncpt_fence_ops, sync_fence, wfi); | 219 | f = gk20a_alloc_fence(&gk20a_syncpt_fence_ops, sync_fence, wfi); |
220 | if (!f) { | 220 | if (!f) { |
221 | #ifdef CONFIG_SYNC | 221 | #ifdef CONFIG_SYNC |
222 | if (sync_fence) | 222 | if (sync_fence) |
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h index 75e135e9..ff00bcf1 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h | |||
@@ -59,6 +59,10 @@ struct gk20a_fence *gk20a_fence_from_syncpt( | |||
59 | u32 id, u32 value, bool wfi, | 59 | u32 id, u32 value, bool wfi, |
60 | bool need_sync_fence); | 60 | bool need_sync_fence); |
61 | 61 | ||
62 | struct gk20a_fence *gk20a_alloc_fence(const struct gk20a_fence_ops *ops, | ||
63 | struct sync_fence *sync_fence, | ||
64 | bool wfi); | ||
65 | |||
62 | /* Fence operations */ | 66 | /* Fence operations */ |
63 | void gk20a_fence_put(struct gk20a_fence *f); | 67 | void gk20a_fence_put(struct gk20a_fence *f); |
64 | struct gk20a_fence *gk20a_fence_get(struct gk20a_fence *f); | 68 | struct gk20a_fence *gk20a_fence_get(struct gk20a_fence *f); |