summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-03-08 20:08:32 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-29 14:50:21 -0400
commitbc92e2fb972e039ee33c1f1477204a4d145a8b96 (patch)
treea43df80fe921f3e4b50c70bf67aef30a0b5dd5bb /drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
parent4022b989aa2e91fe77ed52df49d45838f6d8b9bb (diff)
gpu: nvgpu: Use new kmem API functions (gk20a core)
Use the new kmem API functions in core gk20a code. Also add a struct gk20a pointer to several functions to ensure that the kmem APIs can be used. Bug 1799159 Bug 1823380 Change-Id: I41276509c4f0b68e80b989aa55cf94d8dbbdf156 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1318322 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
index 4b3f3ae6..b82f5275 100644
--- a/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/gr_ctx_gk20a.h
@@ -18,6 +18,8 @@
18#ifndef __GR_CTX_GK20A_H__ 18#ifndef __GR_CTX_GK20A_H__
19#define __GR_CTX_GK20A_H__ 19#define __GR_CTX_GK20A_H__
20 20
21#include <nvgpu/kmem.h>
22
21struct gr_gk20a; 23struct gr_gk20a;
22 24
23/* production netlist, one and only one from below */ 25/* production netlist, one and only one from below */
@@ -145,23 +147,24 @@ struct ctxsw_buf_offset_map_entry {
145}; 147};
146 148
147static inline 149static inline
148struct av_gk20a *alloc_av_list_gk20a(struct av_list_gk20a *avl) 150struct av_gk20a *alloc_av_list_gk20a(struct gk20a *g, struct av_list_gk20a *avl)
149{ 151{
150 avl->l = kzalloc(avl->count * sizeof(*avl->l), GFP_KERNEL); 152 avl->l = nvgpu_kzalloc(g, avl->count * sizeof(*avl->l));
151 return avl->l; 153 return avl->l;
152} 154}
153 155
154static inline 156static inline
155struct aiv_gk20a *alloc_aiv_list_gk20a(struct aiv_list_gk20a *aivl) 157struct aiv_gk20a *alloc_aiv_list_gk20a(struct gk20a *g,
158 struct aiv_list_gk20a *aivl)
156{ 159{
157 aivl->l = kzalloc(aivl->count * sizeof(*aivl->l), GFP_KERNEL); 160 aivl->l = nvgpu_kzalloc(g, aivl->count * sizeof(*aivl->l));
158 return aivl->l; 161 return aivl->l;
159} 162}
160 163
161static inline 164static inline
162u32 *alloc_u32_list_gk20a(struct u32_list_gk20a *u32l) 165u32 *alloc_u32_list_gk20a(struct gk20a *g, struct u32_list_gk20a *u32l)
163{ 166{
164 u32l->l = kzalloc(u32l->count * sizeof(*u32l->l), GFP_KERNEL); 167 u32l->l = nvgpu_kzalloc(g, u32l->count * sizeof(*u32l->l));
165 return u32l->l; 168 return u32l->l;
166} 169}
167 170