diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2014-08-18 04:00:48 -0400 |
---|---|---|
committer | Dan Willemsen <dwillemsen@nvidia.com> | 2015-03-18 15:10:58 -0400 |
commit | 6ea0934dd74cc61bb5f039493df567ec3a4f8b22 (patch) | |
tree | 493131c89ff5746ac0028c1345330910f008c4db | |
parent | 2795c14967fbd45804b05b22dc4672dca7af8ef1 (diff) |
gpu: nvgpu: Do not rail gate in simulation
Simulation does not model rails, so do not try to control them.
Change-Id: I52ec12e7865e18764274dd9ce7a2fbd196b6b9d1
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: http://git-master/r/482181
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Thomas Cherry <tcherry@nvidia.com>
Tested-by: Thomas Cherry <tcherry@nvidia.com>
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c index 675a85b3..db501ec2 100644 --- a/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a_tegra.c | |||
@@ -279,7 +279,12 @@ void gk20a_tegra_calibrate_emc(struct platform_device *pdev, | |||
279 | 279 | ||
280 | static bool gk20a_tegra_is_railgated(struct platform_device *pdev) | 280 | static bool gk20a_tegra_is_railgated(struct platform_device *pdev) |
281 | { | 281 | { |
282 | return !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU); | 282 | bool ret = false; |
283 | |||
284 | if (!tegra_platform_is_linsim()) | ||
285 | ret = !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU); | ||
286 | |||
287 | return ret; | ||
283 | } | 288 | } |
284 | 289 | ||
285 | /* | 290 | /* |
@@ -290,7 +295,8 @@ static bool gk20a_tegra_is_railgated(struct platform_device *pdev) | |||
290 | 295 | ||
291 | static int gk20a_tegra_railgate(struct platform_device *pdev) | 296 | static int gk20a_tegra_railgate(struct platform_device *pdev) |
292 | { | 297 | { |
293 | if (tegra_powergate_is_powered(TEGRA_POWERGATE_GPU)) | 298 | if (!tegra_platform_is_linsim() && |
299 | tegra_powergate_is_powered(TEGRA_POWERGATE_GPU)) | ||
294 | tegra_powergate_partition(TEGRA_POWERGATE_GPU); | 300 | tegra_powergate_partition(TEGRA_POWERGATE_GPU); |
295 | return 0; | 301 | return 0; |
296 | } | 302 | } |
@@ -303,8 +309,9 @@ static int gk20a_tegra_railgate(struct platform_device *pdev) | |||
303 | 309 | ||
304 | static int gk20a_tegra_unrailgate(struct platform_device *pdev) | 310 | static int gk20a_tegra_unrailgate(struct platform_device *pdev) |
305 | { | 311 | { |
306 | int ret; | 312 | int ret = 0; |
307 | ret = tegra_unpowergate_partition(TEGRA_POWERGATE_GPU); | 313 | if (!tegra_platform_is_linsim()) |
314 | ret = tegra_unpowergate_partition(TEGRA_POWERGATE_GPU); | ||
308 | return ret; | 315 | return ret; |
309 | } | 316 | } |
310 | 317 | ||