diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-08 20:08:50 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-30 15:36:09 -0400 |
commit | 24e1c7e0a729158be36d63b821550d206a8a0436 (patch) | |
tree | cf26c850cc63957f63f3e8f97914268839d8e0de /drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |
parent | 7010bf88399ea81b2b35844f738baac19dc5a441 (diff) |
gpu: nvgpu: Use new kmem API functions (misc)
Use the new kmem API functions in misc gk20a code. Some additional
modifications were also made:
o Add a struct gk20a pointer to gk20a_fence to enable proper
kmem free usage.
o Add gk20a pointer to alloc_session() in dbg_gpu_gk20a.c to
use kmem API for allocating a session.
o Plumb a gk20a pointer through the fence creation and deletion.
o Use statically allocated buffers for names in file creation.
Bug 1799159
Bug 1823380
Change-Id: I3678080e3ffa1f9bcf6934e3f4819a1bc531689b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318323
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/ce2_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c index 418572a1..3ca38715 100644 --- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | |||
@@ -26,6 +26,8 @@ | |||
26 | #include <linux/nvhost.h> | 26 | #include <linux/nvhost.h> |
27 | #include <linux/debugfs.h> | 27 | #include <linux/debugfs.h> |
28 | 28 | ||
29 | #include <nvgpu/kmem.h> | ||
30 | |||
29 | #include "gk20a.h" | 31 | #include "gk20a.h" |
30 | #include "debug_gk20a.h" | 32 | #include "debug_gk20a.h" |
31 | 33 | ||
@@ -207,7 +209,7 @@ static void gk20a_ce_delete_gpu_context(struct gk20a_gpu_ctx *ce_ctx) | |||
207 | nvgpu_mutex_release(&ce_ctx->gpu_ctx_mutex); | 209 | nvgpu_mutex_release(&ce_ctx->gpu_ctx_mutex); |
208 | nvgpu_mutex_destroy(&ce_ctx->gpu_ctx_mutex); | 210 | nvgpu_mutex_destroy(&ce_ctx->gpu_ctx_mutex); |
209 | 211 | ||
210 | kfree(ce_ctx); | 212 | nvgpu_kfree(ce_ctx->g, ce_ctx); |
211 | } | 213 | } |
212 | 214 | ||
213 | static inline unsigned int gk20a_ce_get_method_size(int request_operation) | 215 | static inline unsigned int gk20a_ce_get_method_size(int request_operation) |
@@ -428,7 +430,7 @@ u32 gk20a_ce_create_context_with_cb(struct device *dev, | |||
428 | if (!ce_app->initialised || ce_app->app_state != NVGPU_CE_ACTIVE) | 430 | if (!ce_app->initialised || ce_app->app_state != NVGPU_CE_ACTIVE) |
429 | return ctx_id; | 431 | return ctx_id; |
430 | 432 | ||
431 | ce_ctx = kzalloc(sizeof(*ce_ctx), GFP_KERNEL); | 433 | ce_ctx = nvgpu_kzalloc(g, sizeof(*ce_ctx)); |
432 | if (!ce_ctx) | 434 | if (!ce_ctx) |
433 | return ctx_id; | 435 | return ctx_id; |
434 | 436 | ||