From c86e940e1169be32e92297f6dfb07d0c2cade135 Mon Sep 17 00:00:00 2001 From: Alex Waterman Date: Thu, 30 Mar 2017 21:16:51 +0100 Subject: gpu: nvgpu: Remove last Linux kmem usage Replace the last of the Linux kmem API usage with nvgpu kmem calls instead. Several places are left alone - allocating the struct gk20a in particular. Also one function was updated in the clk code to take a struct gk20a as an argument so that it could use nvgpu_kmalloc(). Bug 1799159 Bug 1823380 Change-Id: I84fc3f8e19c63d6265bac6098dc727d93e3ff613 Signed-off-by: Alex Waterman Reviewed-on: http://git-master/r/1331702 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/fifo_gk20a.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'drivers/gpu/nvgpu/gk20a/fifo_gk20a.c') diff --git a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c index f7f39207..b2a6b1a0 100644 --- a/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/fifo_gk20a.c @@ -3489,8 +3489,8 @@ static void __gk20a_fifo_profile_free(struct kref *ref) { struct fifo_gk20a *f = container_of(ref, struct fifo_gk20a, profile.ref); - vfree(f->profile.data); - vfree(f->profile.sorted); + nvgpu_vfree(f->g, f->profile.data); + nvgpu_vfree(f->g, f->profile.sorted); } static int gk20a_fifo_profile_enable(void *data, u64 val) @@ -3518,8 +3518,8 @@ static int gk20a_fifo_profile_enable(void *data, u64 val) FIFO_PROFILING_ENTRIES * sizeof(u64)); if (!(f->profile.data && f->profile.sorted)) { - vfree(f->profile.data); - vfree(f->profile.sorted); + nvgpu_vfree(g, f->profile.data); + nvgpu_vfree(g, f->profile.sorted); nvgpu_mutex_release(&f->profile.lock); return -ENOMEM; } -- cgit v1.2.2