summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/common
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-05-01 16:37:03 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-05-11 14:05:31 -0400
commitbd68f98ba76f43954e9858252a30e6c3b054c146 (patch)
treefaa4e213603b9fe91d911cf5e0f06977c4232db4 /drivers/gpu/nvgpu/common
parentc3fa78b1d9cba28547ca59154207d434931ae746 (diff)
gpu: nvgpu: Move secure_alloc to struct gk20a
Move the function pointer for VPR page allocation to struct gk20a and use it from there. At the same time remove secure_page_alloc pointer and add a direct call to it in probe. Move platform_tegra.h as tegra/linux/platform_gk20a_tegra.h, as it's only declaring functions defined in platform_gk20a_tegra.c to other files in the same directory. JIRA NVGPU-16 Change-Id: I19ac9ee0b2f6734203ae32a1f51d67fd51aced9f Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1473706 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r--drivers/gpu/nvgpu/common/linux/driver_common.c19
1 files changed, 0 insertions, 19 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c
index 14d4dd40..7d6acf91 100644
--- a/drivers/gpu/nvgpu/common/linux/driver_common.c
+++ b/drivers/gpu/nvgpu/common/linux/driver_common.c
@@ -134,20 +134,6 @@ static void nvgpu_init_mm_vars(struct gk20a *g)
134 nvgpu_mutex_init(&g->mm.priv_lock); 134 nvgpu_mutex_init(&g->mm.priv_lock);
135} 135}
136 136
137static int gk20a_secure_page_alloc(struct device *dev)
138{
139 struct gk20a_platform *platform = dev_get_drvdata(dev);
140 int err = 0;
141
142 if (platform->secure_page_alloc) {
143 err = platform->secure_page_alloc(dev);
144 if (!err)
145 platform->secure_alloc_ready = true;
146 }
147
148 return err;
149}
150
151int nvgpu_probe(struct gk20a *g, 137int nvgpu_probe(struct gk20a *g,
152 const char *debugfs_symlink, 138 const char *debugfs_symlink,
153 const char *interface_name, 139 const char *interface_name,
@@ -178,11 +164,6 @@ int nvgpu_probe(struct gk20a *g,
178 if (IS_ENABLED(CONFIG_GK20A_DEVFREQ)) 164 if (IS_ENABLED(CONFIG_GK20A_DEVFREQ))
179 gk20a_scale_init(g->dev); 165 gk20a_scale_init(g->dev);
180 166
181 err = gk20a_secure_page_alloc(g->dev);
182 if (err)
183 dev_err(g->dev,
184 "failed to allocate secure buffer %d\n", err);
185
186 if (platform->late_probe) { 167 if (platform->late_probe) {
187 err = platform->late_probe(g->dev); 168 err = platform->late_probe(g->dev);
188 if (err) { 169 if (err) {