diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gr_gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gr_gk20a.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c index cb4f8007..36b85f3b 100644 --- a/drivers/gpu/nvgpu/gk20a/gr_gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gr_gk20a.c | |||
@@ -31,6 +31,7 @@ | |||
31 | #include <linux/bsearch.h> | 31 | #include <linux/bsearch.h> |
32 | #include <trace/events/gk20a.h> | 32 | #include <trace/events/gk20a.h> |
33 | 33 | ||
34 | #include <nvgpu/kmem.h> | ||
34 | #include <nvgpu/timers.h> | 35 | #include <nvgpu/timers.h> |
35 | #include <nvgpu/nvgpu_common.h> | 36 | #include <nvgpu/nvgpu_common.h> |
36 | 37 | ||
@@ -3423,7 +3424,7 @@ static void gk20a_remove_gr_support(struct gr_gk20a *gr) | |||
3423 | gr->ctx_vars.local_golden_image = NULL; | 3424 | gr->ctx_vars.local_golden_image = NULL; |
3424 | 3425 | ||
3425 | if (gr->ctx_vars.hwpm_ctxsw_buffer_offset_map) | 3426 | if (gr->ctx_vars.hwpm_ctxsw_buffer_offset_map) |
3426 | nvgpu_kfree(gr->ctx_vars.hwpm_ctxsw_buffer_offset_map); | 3427 | nvgpu_big_free(gr->ctx_vars.hwpm_ctxsw_buffer_offset_map); |
3427 | gr->ctx_vars.hwpm_ctxsw_buffer_offset_map = NULL; | 3428 | gr->ctx_vars.hwpm_ctxsw_buffer_offset_map = NULL; |
3428 | 3429 | ||
3429 | gk20a_comptag_allocator_destroy(&gr->comp_tags); | 3430 | gk20a_comptag_allocator_destroy(&gr->comp_tags); |
@@ -8054,7 +8055,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g) | |||
8054 | hwpm_ctxsw_reg_count_max = hwpm_ctxsw_buffer_size >> 2; | 8055 | hwpm_ctxsw_reg_count_max = hwpm_ctxsw_buffer_size >> 2; |
8055 | map_size = hwpm_ctxsw_reg_count_max * sizeof(*map); | 8056 | map_size = hwpm_ctxsw_reg_count_max * sizeof(*map); |
8056 | 8057 | ||
8057 | map = nvgpu_kalloc(map_size, true); | 8058 | map = nvgpu_big_zalloc(map_size); |
8058 | if (!map) | 8059 | if (!map) |
8059 | return -ENOMEM; | 8060 | return -ENOMEM; |
8060 | 8061 | ||
@@ -8144,7 +8145,7 @@ static int gr_gk20a_create_hwpm_ctxsw_buffer_offset_map(struct gk20a *g) | |||
8144 | return 0; | 8145 | return 0; |
8145 | cleanup: | 8146 | cleanup: |
8146 | gk20a_err(dev_from_gk20a(g), "Failed to create HWPM buffer offset map"); | 8147 | gk20a_err(dev_from_gk20a(g), "Failed to create HWPM buffer offset map"); |
8147 | nvgpu_kfree(map); | 8148 | nvgpu_big_free(map); |
8148 | return -EINVAL; | 8149 | return -EINVAL; |
8149 | } | 8150 | } |
8150 | 8151 | ||