mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: Move is_fmodel to struct gk20a
Copy is_fmodel to struct gk20a at probe time, and access it from gk20a instead of platform_gk20a. JIRA NVGPU-16 Change-Id: Ib8d793ea2b02b62da3bfdbb6372d9927658b7ec6 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1463540 Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com> GVS: Gerrit_Virtual_Submit
This commit is contained in:
committed by
mobile promotions
parent
15e9b433f3
commit
6df49a63ca
@@ -189,13 +189,12 @@ int gp10b_init_hal(struct gk20a *g)
|
||||
{
|
||||
struct gpu_ops *gops = &g->ops;
|
||||
struct nvgpu_gpu_characteristics *c = &g->gpu_characteristics;
|
||||
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
|
||||
u32 val;
|
||||
|
||||
gops->clock_gating = gp10b_ops.clock_gating;
|
||||
gops->pmupstate = false;
|
||||
#ifdef CONFIG_TEGRA_ACR
|
||||
if (platform->is_fmodel) {
|
||||
if (g->is_fmodel) {
|
||||
gops->privsecurity = 0;
|
||||
gops->securegpccs = 0;
|
||||
} else if (gk20a_gpu_is_virtual(g->dev)) {
|
||||
@@ -213,7 +212,7 @@ int gp10b_init_hal(struct gk20a *g)
|
||||
}
|
||||
}
|
||||
#else
|
||||
if (platform->is_fmodel) {
|
||||
if (g->is_fmodel) {
|
||||
gk20a_dbg_info("running simulator with PRIV security disabled");
|
||||
gops->privsecurity = 0;
|
||||
gops->securegpccs = 0;
|
||||
|
||||
@@ -71,7 +71,6 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
|
||||
u32 compbit_backing_size;
|
||||
|
||||
int err;
|
||||
struct gk20a_platform *platform = dev_get_drvdata(g->dev);
|
||||
|
||||
gk20a_dbg_fn("");
|
||||
|
||||
@@ -102,7 +101,7 @@ static int gp10b_ltc_init_comptags(struct gk20a *g, struct gr_gk20a *gr)
|
||||
gk20a_dbg_info("gobs_per_comptagline_per_slice: %d",
|
||||
gobs_per_comptagline_per_slice);
|
||||
|
||||
if (platform->is_fmodel)
|
||||
if (g->is_fmodel)
|
||||
err = gk20a_ltc_alloc_phys_cbc(g, compbit_backing_size);
|
||||
else
|
||||
err = gk20a_ltc_alloc_virt_cbc(g, compbit_backing_size);
|
||||
|
||||
Reference in New Issue
Block a user