diff options
Diffstat (limited to 'drivers/gpu/nvgpu')
-rw-r--r-- | drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c index efecb1e3..44b27fe7 100644 --- a/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/gp10b/platform_gp10b_tegra.c | |||
@@ -63,17 +63,28 @@ static int gp10b_tegra_late_probe(struct platform_device *pdev) | |||
63 | 63 | ||
64 | static bool gp10b_tegra_is_railgated(struct platform_device *pdev) | 64 | static bool gp10b_tegra_is_railgated(struct platform_device *pdev) |
65 | { | 65 | { |
66 | return false; | 66 | bool ret = false; |
67 | |||
68 | if (!tegra_platform_is_linsim()) | ||
69 | ret = !tegra_powergate_is_powered(TEGRA_POWERGATE_GPU); | ||
70 | |||
71 | return ret; | ||
67 | } | 72 | } |
68 | 73 | ||
69 | static int gp10b_tegra_railgate(struct platform_device *pdev) | 74 | static int gp10b_tegra_railgate(struct platform_device *pdev) |
70 | { | 75 | { |
76 | if (!tegra_platform_is_linsim() && | ||
77 | tegra_powergate_is_powered(TEGRA_POWERGATE_GPU)) | ||
78 | tegra_powergate_partition(TEGRA_POWERGATE_GPU); | ||
71 | return 0; | 79 | return 0; |
72 | } | 80 | } |
73 | 81 | ||
74 | static int gp10b_tegra_unrailgate(struct platform_device *pdev) | 82 | static int gp10b_tegra_unrailgate(struct platform_device *pdev) |
75 | { | 83 | { |
76 | return 0; | 84 | int ret = 0; |
85 | if (!tegra_platform_is_linsim()) | ||
86 | ret = tegra_unpowergate_partition(TEGRA_POWERGATE_GPU); | ||
87 | return ret; | ||
77 | } | 88 | } |
78 | 89 | ||
79 | static int gp10b_tegra_suspend(struct device *dev) | 90 | static int gp10b_tegra_suspend(struct device *dev) |
@@ -85,6 +96,11 @@ struct gk20a_platform t18x_gpu_tegra_platform = { | |||
85 | .has_syncpoints = true, | 96 | .has_syncpoints = true, |
86 | 97 | ||
87 | /* power management configuration */ | 98 | /* power management configuration */ |
99 | .railgate_delay = 500, | ||
100 | .clockgate_delay = 50, | ||
101 | |||
102 | /* power management configuration */ | ||
103 | .can_railgate = false, | ||
88 | .enable_elpg = false, | 104 | .enable_elpg = false, |
89 | 105 | ||
90 | .probe = gp10b_tegra_probe, | 106 | .probe = gp10b_tegra_probe, |