mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
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>
This commit is contained in:
committed by
mobile promotions
parent
c3fa78b1d9
commit
bd68f98ba7
@@ -134,20 +134,6 @@ static void nvgpu_init_mm_vars(struct gk20a *g)
|
||||
nvgpu_mutex_init(&g->mm.priv_lock);
|
||||
}
|
||||
|
||||
static int gk20a_secure_page_alloc(struct device *dev)
|
||||
{
|
||||
struct gk20a_platform *platform = dev_get_drvdata(dev);
|
||||
int err = 0;
|
||||
|
||||
if (platform->secure_page_alloc) {
|
||||
err = platform->secure_page_alloc(dev);
|
||||
if (!err)
|
||||
platform->secure_alloc_ready = true;
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
|
||||
int nvgpu_probe(struct gk20a *g,
|
||||
const char *debugfs_symlink,
|
||||
const char *interface_name,
|
||||
@@ -178,11 +164,6 @@ int nvgpu_probe(struct gk20a *g,
|
||||
if (IS_ENABLED(CONFIG_GK20A_DEVFREQ))
|
||||
gk20a_scale_init(g->dev);
|
||||
|
||||
err = gk20a_secure_page_alloc(g->dev);
|
||||
if (err)
|
||||
dev_err(g->dev,
|
||||
"failed to allocate secure buffer %d\n", err);
|
||||
|
||||
if (platform->late_probe) {
|
||||
err = platform->late_probe(g->dev);
|
||||
if (err) {
|
||||
|
||||
Reference in New Issue
Block a user