summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/fence_gk20a.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
index 323caa8f..b8a1dcbc 100644
--- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.c
@@ -49,8 +49,8 @@ static void gk20a_fence_free(struct kref *ref)
49 gk20a_semaphore_put(f->semaphore); 49 gk20a_semaphore_put(f->semaphore);
50 50
51 if (f->allocator) { 51 if (f->allocator) {
52 if (gk20a_alloc_initialized(f->allocator)) 52 if (nvgpu_alloc_initialized(f->allocator))
53 gk20a_free(f->allocator, (size_t)f); 53 nvgpu_free(f->allocator, (size_t)f);
54 } else 54 } else
55 kfree(f); 55 kfree(f);
56} 56}
@@ -129,7 +129,7 @@ int gk20a_alloc_fence_pool(struct channel_gk20a *c, unsigned int count)
129 if (!fence_pool) 129 if (!fence_pool)
130 return -ENOMEM; 130 return -ENOMEM;
131 131
132 err = gk20a_lockless_allocator_init(c->g, &c->fence_allocator, 132 err = nvgpu_lockless_allocator_init(c->g, &c->fence_allocator,
133 "fence_pool", (size_t)fence_pool, size, 133 "fence_pool", (size_t)fence_pool, size,
134 sizeof(struct gk20a_fence), 0); 134 sizeof(struct gk20a_fence), 0);
135 if (err) 135 if (err)
@@ -144,11 +144,11 @@ fail:
144 144
145void gk20a_free_fence_pool(struct channel_gk20a *c) 145void gk20a_free_fence_pool(struct channel_gk20a *c)
146{ 146{
147 if (gk20a_alloc_initialized(&c->fence_allocator)) { 147 if (nvgpu_alloc_initialized(&c->fence_allocator)) {
148 void *base = (void *)(uintptr_t) 148 void *base = (void *)(uintptr_t)
149 gk20a_alloc_base(&c->fence_allocator); 149 nvgpu_alloc_base(&c->fence_allocator);
150 150
151 gk20a_alloc_destroy(&c->fence_allocator); 151 nvgpu_alloc_destroy(&c->fence_allocator);
152 vfree(base); 152 vfree(base);
153 } 153 }
154} 154}
@@ -158,9 +158,9 @@ struct gk20a_fence *gk20a_alloc_fence(struct channel_gk20a *c)
158 struct gk20a_fence *fence = NULL; 158 struct gk20a_fence *fence = NULL;
159 159
160 if (channel_gk20a_is_prealloc_enabled(c)) { 160 if (channel_gk20a_is_prealloc_enabled(c)) {
161 if (gk20a_alloc_initialized(&c->fence_allocator)) { 161 if (nvgpu_alloc_initialized(&c->fence_allocator)) {
162 fence = (struct gk20a_fence *)(uintptr_t) 162 fence = (struct gk20a_fence *)(uintptr_t)
163 gk20a_alloc(&c->fence_allocator, 163 nvgpu_alloc(&c->fence_allocator,
164 sizeof(struct gk20a_fence)); 164 sizeof(struct gk20a_fence));
165 165
166 /* clear the node and reset the allocator pointer */ 166 /* clear the node and reset the allocator pointer */