diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/nvgpu_common.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/nvgpu_common.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/drivers/gpu/nvgpu/common/nvgpu_common.c b/drivers/gpu/nvgpu/common/nvgpu_common.c index d7ff4841..771d4121 100644 --- a/drivers/gpu/nvgpu/common/nvgpu_common.c +++ b/drivers/gpu/nvgpu/common/nvgpu_common.c | |||
@@ -17,11 +17,12 @@ | |||
17 | #include <linux/dma-mapping.h> | 17 | #include <linux/dma-mapping.h> |
18 | #include <linux/firmware.h> | 18 | #include <linux/firmware.h> |
19 | 19 | ||
20 | #include <nvgpu/kmem.h> | ||
21 | #include <nvgpu/nvgpu_common.h> | ||
22 | |||
20 | #include "gk20a/gk20a_scale.h" | 23 | #include "gk20a/gk20a_scale.h" |
21 | #include "gk20a/gk20a.h" | 24 | #include "gk20a/gk20a.h" |
22 | 25 | ||
23 | #include <nvgpu/nvgpu_common.h> | ||
24 | |||
25 | #define EMC3D_DEFAULT_RATIO 750 | 26 | #define EMC3D_DEFAULT_RATIO 750 |
26 | 27 | ||
27 | static void nvgpu_init_vars(struct gk20a *g) | 28 | static void nvgpu_init_vars(struct gk20a *g) |
@@ -164,7 +165,7 @@ int nvgpu_probe(struct gk20a *g, | |||
164 | gk20a_create_sysfs(g->dev); | 165 | gk20a_create_sysfs(g->dev); |
165 | gk20a_debug_init(g->dev, debugfs_symlink); | 166 | gk20a_debug_init(g->dev, debugfs_symlink); |
166 | 167 | ||
167 | g->dbg_regops_tmp_buf = kzalloc(SZ_4K, GFP_KERNEL); | 168 | g->dbg_regops_tmp_buf = nvgpu_kzalloc(g, SZ_4K); |
168 | if (!g->dbg_regops_tmp_buf) { | 169 | if (!g->dbg_regops_tmp_buf) { |
169 | dev_err(g->dev, "couldn't allocate regops tmp buf"); | 170 | dev_err(g->dev, "couldn't allocate regops tmp buf"); |
170 | return -ENOMEM; | 171 | return -ENOMEM; |
@@ -190,7 +191,8 @@ static const struct firmware *do_request_firmware(struct device *dev, | |||
190 | path_len = strlen(prefix) + strlen(fw_name); | 191 | path_len = strlen(prefix) + strlen(fw_name); |
191 | path_len += 2; /* for the path separator and zero terminator*/ | 192 | path_len += 2; /* for the path separator and zero terminator*/ |
192 | 193 | ||
193 | fw_path = kzalloc(sizeof(*fw_path) * path_len, GFP_KERNEL); | 194 | fw_path = nvgpu_kzalloc(get_gk20a(dev), |
195 | sizeof(*fw_path) * path_len); | ||
194 | if (!fw_path) | 196 | if (!fw_path) |
195 | return NULL; | 197 | return NULL; |
196 | 198 | ||
@@ -207,7 +209,7 @@ static const struct firmware *do_request_firmware(struct device *dev, | |||
207 | err = request_firmware(&fw, fw_name, dev); | 209 | err = request_firmware(&fw, fw_name, dev); |
208 | #endif | 210 | #endif |
209 | 211 | ||
210 | kfree(fw_path); | 212 | nvgpu_kfree(get_gk20a(dev), fw_path); |
211 | if (err) | 213 | if (err) |
212 | return NULL; | 214 | return NULL; |
213 | return fw; | 215 | return fw; |