diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2016-01-12 07:19:57 -0500 |
---|---|---|
committer | Terje Bergstrom <tbergstrom@nvidia.com> | 2016-05-03 12:01:49 -0400 |
commit | 0dd7ffbf2367fa892a0730a8264077e79fd1b18c (patch) | |
tree | 5b1b7113a9e40f254d9e0bad660861a6321cf7f1 /drivers | |
parent | caed43e0a208d87dd2c1788a74897072422b89a8 (diff) |
gpu: nvgpu: remove wait in shutdown
In gk20a_pm_shutdown(), we currently wait for 2s
for all channels to finish their work
But we already cancel all the nvgpu workers, freeze
user processes during shutdown
So the waiting should not be required, and hence
remove it
Bug 200166139
Change-Id: I0012f1b3c0f4f676958d083f8c60a001f7015fb0
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1121918
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Tested-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 7b0db89e..dd27ef64 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -1155,26 +1155,23 @@ static int gk20a_pm_disable_clk(struct device *dev) | |||
1155 | 1155 | ||
1156 | static void gk20a_pm_shutdown(struct platform_device *pdev) | 1156 | static void gk20a_pm_shutdown(struct platform_device *pdev) |
1157 | { | 1157 | { |
1158 | struct gk20a_platform *platform = platform_get_drvdata(pdev); | ||
1159 | |||
1160 | dev_info(&pdev->dev, "shutting down"); | ||
1161 | |||
1162 | /* If GPU is already railgated, | ||
1163 | * just prevent more requests, and return */ | ||
1164 | if (platform->is_railgated && platform->is_railgated(&pdev->dev)) { | ||
1158 | #ifdef CONFIG_PM | 1165 | #ifdef CONFIG_PM |
1159 | unsigned long timeout = jiffies + | 1166 | __pm_runtime_disable(&pdev->dev, false); |
1160 | msecs_to_jiffies(GK20A_WAIT_FOR_IDLE_MS); | ||
1161 | int ref_cnt; | ||
1162 | #endif | 1167 | #endif |
1168 | return; | ||
1169 | } | ||
1163 | 1170 | ||
1164 | dev_info(&pdev->dev, "shutting down"); | ||
1165 | 1171 | ||
1166 | #ifdef CONFIG_PM | 1172 | #ifdef CONFIG_PM |
1167 | /* Prevent more requests by disabling Runtime PM */ | 1173 | /* Prevent more requests by disabling Runtime PM */ |
1168 | __pm_runtime_disable(&pdev->dev, false); | 1174 | __pm_runtime_disable(&pdev->dev, false); |
1169 | |||
1170 | /* Wait until current running requests are finished */ | ||
1171 | while (time_before(jiffies, timeout)) { | ||
1172 | ref_cnt = atomic_read(&pdev->dev.power.usage_count); | ||
1173 | if (ref_cnt > 1) | ||
1174 | msleep(1); | ||
1175 | else | ||
1176 | break; | ||
1177 | } | ||
1178 | #endif | 1175 | #endif |
1179 | 1176 | ||
1180 | /* Be ready for rail-gate after this point */ | 1177 | /* Be ready for rail-gate after this point */ |
@@ -1182,6 +1179,8 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) | |||
1182 | vgpu_pm_prepare_poweroff(&pdev->dev); | 1179 | vgpu_pm_prepare_poweroff(&pdev->dev); |
1183 | else | 1180 | else |
1184 | gk20a_pm_prepare_poweroff(&pdev->dev); | 1181 | gk20a_pm_prepare_poweroff(&pdev->dev); |
1182 | |||
1183 | dev_info(&pdev->dev, "shut down complete\n"); | ||
1185 | } | 1184 | } |
1186 | 1185 | ||
1187 | #ifdef CONFIG_PM | 1186 | #ifdef CONFIG_PM |