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.h15
1 files changed, 13 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h
index 3fe2d8b2..97a7d957 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-2015, NVIDIA CORPORATION. All rights reserved. 6 * Copyright (c) 2014-2016, NVIDIA CORPORATION. All rights reserved.
7 * 7 *
8 * This program is free software; you can redistribute it and/or modify it 8 * This program is free software; you can redistribute it and/or modify it
9 * under the terms and conditions of the GNU General Public License, 9 * under the terms and conditions of the GNU General Public License,
@@ -45,6 +45,9 @@ struct gk20a_fence {
45 struct platform_device *host1x_pdev; 45 struct platform_device *host1x_pdev;
46 u32 syncpt_id; 46 u32 syncpt_id;
47 u32 syncpt_value; 47 u32 syncpt_value;
48
49 /* Valid for fences part of a pre-allocated fence pool */
50 struct gk20a_allocator *allocator;
48}; 51};
49 52
50/* Fences can be created from semaphores or syncpoint (id, value) pairs */ 53/* Fences can be created from semaphores or syncpoint (id, value) pairs */
@@ -62,7 +65,15 @@ int gk20a_fence_from_syncpt(
62 u32 id, u32 value, bool wfi, 65 u32 id, u32 value, bool wfi,
63 bool need_sync_fence); 66 bool need_sync_fence);
64 67
65struct gk20a_fence *gk20a_alloc_fence(struct channel_gk20a *c); 68int gk20a_alloc_fence_pool(
69 struct channel_gk20a *c,
70 int size);
71
72void gk20a_free_fence_pool(
73 struct channel_gk20a *c);
74
75struct gk20a_fence *gk20a_alloc_fence(
76 struct channel_gk20a *c);
66 77
67void gk20a_init_fence(struct gk20a_fence *f, 78void gk20a_init_fence(struct gk20a_fence *f,
68 const struct gk20a_fence_ops *ops, 79 const struct gk20a_fence_ops *ops,