summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
diff options
context:
space:
mode:
authorSeema Khowala <seemaj@nvidia.com>2016-07-08 19:12:44 -0400
committerSeshendra Gadagottu <sgadagottu@nvidia.com>2016-07-27 17:32:54 -0400
commitd64e2015147c4dc48c0d3b8d6ee612dd8addf04c (patch)
tree68753a49ca7da2264ff007c675b1dfa32f6da3bd /drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
parent9ca4c6b596fe50c652907193bb167ee29c208b4b (diff)
gpu: nvgpu: add check for is_fmodel
is_fmodel flag will be set in gk20a_probe(). Updated code for is_fmodel check, instead of check for supported simulated platforms. Bug 1735760 Change-Id: I7cbac2196130fe5ce4c1a910504879e6948c13da Signed-off-by: Seema Khowala <seemaj@nvidia.com> Reviewed-on: http://git-master/r/1177869 Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Tested-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: Adeel Raza <araza@nvidia.com> Reviewed-by: Automatic_Commit_Validation_User
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
index 745d963c..819c50a4 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c
@@ -83,7 +83,7 @@ int gk20a_tegra_secure_page_alloc(struct device *dev)
83 dma_addr_t iova; 83 dma_addr_t iova;
84 size_t size = PAGE_SIZE; 84 size_t size = PAGE_SIZE;
85 85
86 if (tegra_platform_is_linsim()) 86 if (platform->is_fmodel)
87 return -EINVAL; 87 return -EINVAL;
88 88
89 (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova, 89 (void)dma_alloc_attrs(&tegra_vpr_dev, size, &iova,
@@ -314,7 +314,7 @@ static bool gk20a_tegra_is_railgated(struct device *dev)
314 struct gk20a_platform *platform = dev_get_drvdata(dev); 314 struct gk20a_platform *platform = dev_get_drvdata(dev);
315 bool ret = false; 315 bool ret = false;
316 316
317 if (!tegra_platform_is_linsim()) 317 if (!(platform->is_fmodel))
318 ret = !tegra_dvfs_is_rail_up(platform->gpu_rail); 318 ret = !tegra_dvfs_is_rail_up(platform->gpu_rail);
319 319
320 return ret; 320 return ret;
@@ -331,7 +331,7 @@ static int gk20a_tegra_railgate(struct device *dev)
331 struct gk20a_platform *platform = dev_get_drvdata(dev); 331 struct gk20a_platform *platform = dev_get_drvdata(dev);
332 int ret = 0; 332 int ret = 0;
333 333
334 if (tegra_platform_is_linsim() || 334 if (platform->is_fmodel ||
335 !tegra_dvfs_is_rail_up(platform->gpu_rail)) 335 !tegra_dvfs_is_rail_up(platform->gpu_rail))
336 return 0; 336 return 0;
337 337
@@ -383,7 +383,7 @@ static int gm20b_tegra_railgate(struct device *dev)
383 struct gk20a_platform *platform = dev_get_drvdata(dev); 383 struct gk20a_platform *platform = dev_get_drvdata(dev);
384 int ret = 0; 384 int ret = 0;
385 385
386 if (tegra_platform_is_linsim() || 386 if (platform->is_fmodel ||
387 !tegra_dvfs_is_rail_up(platform->gpu_rail)) 387 !tegra_dvfs_is_rail_up(platform->gpu_rail))
388 return 0; 388 return 0;
389 389
@@ -439,7 +439,7 @@ static int gk20a_tegra_unrailgate(struct device *dev)
439 int ret = 0; 439 int ret = 0;
440 bool first = false; 440 bool first = false;
441 441
442 if (tegra_platform_is_linsim()) 442 if (platform->is_fmodel)
443 return 0; 443 return 0;
444 444
445 if (!platform->gpu_rail) { 445 if (!platform->gpu_rail) {
@@ -510,7 +510,7 @@ static int gm20b_tegra_unrailgate(struct device *dev)
510 int ret = 0; 510 int ret = 0;
511 bool first = false; 511 bool first = false;
512 512
513 if (tegra_platform_is_linsim()) 513 if (platform->is_fmodel)
514 return 0; 514 return 0;
515 515
516 if (!platform->gpu_rail) { 516 if (!platform->gpu_rail) {