summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
diff options
context:
space:
mode:
authorAlex Waterman <alexw@nvidia.com>2017-03-08 19:58:49 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-22 21:37:04 -0400
commit3ab4a992e10cd0a312a865a4937b90162978356c (patch)
tree1c9ea14f6aa9b846d1c800f77efa4d1cdcc86eb5 /drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
parentdd947aeec4d2b1c043202c87377d10b2e31311f9 (diff)
gpu: nvgpu: Use new kmem API functions (gp10b/*)
Use the new kmem API functions in gp10b/*. Bug 1799159 Bug 1823380 Change-Id: Ia643c704aca2e23e3762c9b7dbdf1aa1f2363811 Signed-off-by: Alex Waterman <alexw@nvidia.com> Reviewed-on: http://git-master/r/1318309 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
index 27db9c12..8e8792f6 100644
--- a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
@@ -16,18 +16,19 @@
16#include <linux/of_platform.h> 16#include <linux/of_platform.h>
17#include <linux/nvhost.h> 17#include <linux/nvhost.h>
18#include <linux/debugfs.h> 18#include <linux/debugfs.h>
19#include <soc/tegra/tegra_powergate.h>
20#include <linux/platform_data/tegra_edp.h> 19#include <linux/platform_data/tegra_edp.h>
21#include <linux/dma-buf.h> 20#include <linux/dma-buf.h>
22#include <linux/nvmap.h> 21#include <linux/nvmap.h>
23#include <linux/reset.h> 22#include <linux/reset.h>
24#include <linux/hashtable.h> 23#include <linux/hashtable.h>
25
26#include <linux/platform/tegra/emc_bwmgr.h> 24#include <linux/platform/tegra/emc_bwmgr.h>
27 25
28#include <uapi/linux/nvgpu.h> 26#include <uapi/linux/nvgpu.h>
29 27
30#include <soc/tegra/tegra_bpmp.h> 28#include <soc/tegra/tegra_bpmp.h>
29#include <soc/tegra/tegra_powergate.h>
30
31#include <nvgpu/kmem.h>
31 32
32#include "clk.h" 33#include "clk.h"
33 34
@@ -540,11 +541,13 @@ static int ecc_stat_create(struct device *dev,
540 num_hw_units = g->gr.tpc_count; 541 num_hw_units = g->gr.tpc_count;
541 542
542 /* Allocate arrays */ 543 /* Allocate arrays */
543 dev_attr_array = kzalloc(sizeof(struct device_attribute) * num_hw_units, GFP_KERNEL); 544 dev_attr_array = nvgpu_kzalloc(g, sizeof(struct device_attribute) *
544 ecc_stat->counters = kzalloc(sizeof(u32) * num_hw_units, GFP_KERNEL); 545 num_hw_units);
545 ecc_stat->names = kzalloc(sizeof(char *) * num_hw_units, GFP_KERNEL); 546 ecc_stat->counters = nvgpu_kzalloc(g, sizeof(u32) * num_hw_units);
547 ecc_stat->names = nvgpu_kzalloc(g, sizeof(char *) * num_hw_units);
546 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) { 548 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) {
547 ecc_stat->names[hw_unit] = kzalloc(sizeof(char) * ECC_STAT_NAME_MAX_SIZE, GFP_KERNEL); 549 ecc_stat->names[hw_unit] = nvgpu_kzalloc(g, sizeof(char) *
550 ECC_STAT_NAME_MAX_SIZE);
548 } 551 }
549 552
550 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) { 553 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) {
@@ -604,12 +607,12 @@ static void ecc_stat_remove(struct device *dev,
604 hash_del(&ecc_stat->hash_node); 607 hash_del(&ecc_stat->hash_node);
605 608
606 /* Free arrays */ 609 /* Free arrays */
607 kfree(ecc_stat->counters); 610 nvgpu_kfree(g, ecc_stat->counters);
608 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) { 611 for (hw_unit = 0; hw_unit < num_hw_units; hw_unit++) {
609 kfree(ecc_stat->names[hw_unit]); 612 nvgpu_kfree(g, ecc_stat->names[hw_unit]);
610 } 613 }
611 kfree(ecc_stat->names); 614 nvgpu_kfree(g, ecc_stat->names);
612 kfree(dev_attr_array); 615 nvgpu_kfree(g, dev_attr_array);
613} 616}
614 617
615void gr_gp10b_create_sysfs(struct device *dev) 618void gr_gp10b_create_sysfs(struct device *dev)