summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
index 4bc7ee52..53d5f78d 100644
--- a/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/css_gr_gk20a.c
@@ -19,9 +19,11 @@
19#include <linux/bitops.h> 19#include <linux/bitops.h>
20#include <linux/dma-mapping.h> 20#include <linux/dma-mapping.h>
21#include <linux/dma-buf.h> 21#include <linux/dma-buf.h>
22#include <nvgpu/lock.h>
23#include <linux/vmalloc.h> 22#include <linux/vmalloc.h>
24 23
24#include <nvgpu/kmem.h>
25#include <nvgpu/lock.h>
26
25#include "gk20a.h" 27#include "gk20a.h"
26#include "css_gr_gk20a.h" 28#include "css_gr_gk20a.h"
27 29
@@ -112,7 +114,7 @@ static int css_gr_create_shared_data(struct gr_gk20a *gr)
112 if (gr->cs_data) 114 if (gr->cs_data)
113 return 0; 115 return 0;
114 116
115 data = kzalloc(sizeof(*data), GFP_KERNEL); 117 data = nvgpu_kzalloc(gr->g, sizeof(*data));
116 if (!data) 118 if (!data)
117 return -ENOMEM; 119 return -ENOMEM;
118 120
@@ -234,7 +236,7 @@ static void css_gr_free_shared_data(struct gr_gk20a *gr)
234 g->ops.css.disable_snapshot(gr); 236 g->ops.css.disable_snapshot(gr);
235 237
236 /* release the objects */ 238 /* release the objects */
237 kfree(gr->cs_data); 239 nvgpu_kfree(gr->g, gr->cs_data);
238 gr->cs_data = NULL; 240 gr->cs_data = NULL;
239 } 241 }
240} 242}
@@ -458,7 +460,7 @@ static int css_gr_free_client_data(struct gk20a *g,
458 dma_buf_put(client->dma_handler); 460 dma_buf_put(client->dma_handler);
459 } 461 }
460 462
461 kfree(client); 463 nvgpu_kfree(g, client);
462 464
463 return ret; 465 return ret;
464} 466}
@@ -471,7 +473,7 @@ static int css_gr_create_client_data(struct gk20a *g,
471 struct gk20a_cs_snapshot_client *cur; 473 struct gk20a_cs_snapshot_client *cur;
472 int ret = 0; 474 int ret = 0;
473 475
474 cur = kzalloc(sizeof(*cur), GFP_KERNEL); 476 cur = nvgpu_kzalloc(g, sizeof(*cur));
475 if (!cur) { 477 if (!cur) {
476 ret = -ENOMEM; 478 ret = -ENOMEM;
477 goto failed; 479 goto failed;