summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-03-30 16:16:51 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-04-04 19:57:03 -0400
commitc86e940e1169be32e92297f6dfb07d0c2cade135 (patch)
tree86fc119bc20f6db09eda52ace9a2d76c6bf9ef53 /drivers/gpu/nvgpu/vgpu/gr_vgpu.c
parente3bd4ae2a59fef37a85fbca168fc479dd5514023 (diff)
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 <alexw@nvidia.com> Reviewed-on: http://git-master/r/1331702 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gr_vgpu.c')
-rw-r--r--drivers/gpu/nvgpu/vgpu/gr_vgpu.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
index c6a51719..612e50e7 100644
--- a/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
+++ b/drivers/gpu/nvgpu/vgpu/gr_vgpu.c
@@ -1126,7 +1126,7 @@ static int vgpu_gr_suspend_resume_contexts(struct gk20a *g,
1126 1126
1127 size_in = size_out + n * sizeof(u16); 1127 size_in = size_out + n * sizeof(u16);
1128 1128
1129 msg = kmalloc(size_in, GFP_KERNEL); 1129 msg = nvgpu_kmalloc(g, size_in);
1130 if (!msg) 1130 if (!msg)
1131 return -ENOMEM; 1131 return -ENOMEM;
1132 1132
@@ -1159,7 +1159,7 @@ fail:
1159 nvgpu_mutex_release(&g->dbg_sessions_lock); 1159 nvgpu_mutex_release(&g->dbg_sessions_lock);
1160 1160
1161 *ctx_resident_ch_fd = channel_fd; 1161 *ctx_resident_ch_fd = channel_fd;
1162 kfree(msg); 1162 nvgpu_kfree(g, msg);
1163 1163
1164 return err; 1164 return err;
1165} 1165}