summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Zhao <rizhao@nvidia.com>2018-01-26 19:31:12 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-02-27 17:29:39 -0500
commit649ba2a4b3fcbea2135ce4d0d00feb7563b14270 (patch)
treeb47e94fc77311e0498218e17569b0b956f39dcd2
parenta26de1185a9cc894d37ea826f67ba4f34a646fb3 (diff)
gpu: nvgpu: vgpu: remove parameter dn from tegra_hv_mempool_reserve()
Device tree node was not used by the function, so remove it to make the function more common. Jira EVLR-2364 Change-Id: I34b143a10c021030a1e94f019081b352f72a51bf Signed-off-by: Richard Zhao <rizhao@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1647032 Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com> Reviewed-by: Aingara Paramakuru <aparamakuru@nvidia.com> Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Nirav Patel <nipatel@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c6
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c6
2 files changed, 4 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
index fba3cc63..ba13c54e 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/css_vgpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -33,7 +33,6 @@ static struct tegra_hv_ivm_cookie *vgpu_css_reserve_mempool(struct gk20a *g)
33 struct device *dev = dev_from_gk20a(g); 33 struct device *dev = dev_from_gk20a(g);
34 struct device_node *np = dev->of_node; 34 struct device_node *np = dev->of_node;
35 struct of_phandle_args args; 35 struct of_phandle_args args;
36 struct device_node *hv_np;
37 struct tegra_hv_ivm_cookie *cookie; 36 struct tegra_hv_ivm_cookie *cookie;
38 u32 mempool; 37 u32 mempool;
39 int err; 38 int err;
@@ -45,9 +44,8 @@ static struct tegra_hv_ivm_cookie *vgpu_css_reserve_mempool(struct gk20a *g)
45 return ERR_PTR(err); 44 return ERR_PTR(err);
46 } 45 }
47 46
48 hv_np = args.np;
49 mempool = args.args[0]; 47 mempool = args.args[0];
50 cookie = tegra_hv_mempool_reserve(hv_np, mempool); 48 cookie = tegra_hv_mempool_reserve(mempool);
51 if (IS_ERR_OR_NULL(cookie)) { 49 if (IS_ERR_OR_NULL(cookie)) {
52 nvgpu_err(g, "mempool %u reserve failed", mempool); 50 nvgpu_err(g, "mempool %u reserve failed", mempool);
53 return ERR_PTR(-EINVAL); 51 return ERR_PTR(-EINVAL);
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
index 5344313a..bf692c4d 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/fecs_trace_vgpu.c
@@ -1,5 +1,5 @@
1/* 1/*
2 * Copyright (c) 2016-2017, NVIDIA CORPORATION. All rights reserved. 2 * Copyright (c) 2016-2018, NVIDIA CORPORATION. All rights reserved.
3 * 3 *
4 * This program is free software; you can redistribute it and/or modify it 4 * This program is free software; you can redistribute it and/or modify it
5 * under the terms and conditions of the GNU General Public License, 5 * under the terms and conditions of the GNU General Public License,
@@ -43,7 +43,6 @@ int vgpu_fecs_trace_init(struct gk20a *g)
43 struct device *dev = dev_from_gk20a(g); 43 struct device *dev = dev_from_gk20a(g);
44 struct device_node *np = dev->of_node; 44 struct device_node *np = dev->of_node;
45 struct of_phandle_args args; 45 struct of_phandle_args args;
46 struct device_node *hv_np;
47 struct vgpu_fecs_trace *vcst; 46 struct vgpu_fecs_trace *vcst;
48 u32 mempool; 47 u32 mempool;
49 int err; 48 int err;
@@ -62,9 +61,8 @@ int vgpu_fecs_trace_init(struct gk20a *g)
62 } 61 }
63 __nvgpu_set_enabled(g, NVGPU_SUPPORT_FECS_CTXSW_TRACE, true); 62 __nvgpu_set_enabled(g, NVGPU_SUPPORT_FECS_CTXSW_TRACE, true);
64 63
65 hv_np = args.np;
66 mempool = args.args[0]; 64 mempool = args.args[0];
67 vcst->cookie = tegra_hv_mempool_reserve(hv_np, mempool); 65 vcst->cookie = tegra_hv_mempool_reserve(mempool);
68 if (IS_ERR(vcst->cookie)) { 66 if (IS_ERR(vcst->cookie)) {
69 dev_info(dev_from_gk20a(g), 67 dev_info(dev_from_gk20a(g),
70 "mempool %u reserve failed\n", mempool); 68 "mempool %u reserve failed\n", mempool);