summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c13
1 files changed, 5 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 339656c7..a50dfa0e 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -17,9 +17,7 @@
17 */ 17 */
18 18
19#include <linux/module.h> 19#include <linux/module.h>
20#include <linux/dma-mapping.h>
21#include <linux/string.h> 20#include <linux/string.h>
22#include <linux/delay.h>
23#include <linux/interrupt.h> 21#include <linux/interrupt.h>
24#include <linux/irq.h> 22#include <linux/irq.h>
25#include <linux/export.h> 23#include <linux/export.h>
@@ -30,7 +28,6 @@
30#include <linux/thermal.h> 28#include <linux/thermal.h>
31#include <asm/cacheflush.h> 29#include <asm/cacheflush.h>
32#include <linux/debugfs.h> 30#include <linux/debugfs.h>
33#include <nvgpu/lock.h>
34#include <linux/clk/tegra.h> 31#include <linux/clk/tegra.h>
35#include <linux/kthread.h> 32#include <linux/kthread.h>
36#include <linux/platform/tegra/common.h> 33#include <linux/platform/tegra/common.h>
@@ -1181,7 +1178,7 @@ int gk20a_wait_for_idle(struct device *dev)
1181 1178
1182 while ((atomic_read(&g->usage_count) != target_usage_count) 1179 while ((atomic_read(&g->usage_count) != target_usage_count)
1183 && (wait_length-- >= 0)) 1180 && (wait_length-- >= 0))
1184 msleep(20); 1181 nvgpu_msleep(20);
1185 1182
1186 if (wait_length < 0) { 1183 if (wait_length < 0) {
1187 pr_warn("%s: Timed out waiting for idle (%d)!\n", 1184 pr_warn("%s: Timed out waiting for idle (%d)!\n",
@@ -1336,7 +1333,7 @@ int __gk20a_do_idle(struct device *dev, bool force_reset)
1336 1333
1337 /* check and wait until GPU is idle (with a timeout) */ 1334 /* check and wait until GPU is idle (with a timeout) */
1338 do { 1335 do {
1339 msleep(1); 1336 nvgpu_msleep(1);
1340 ref_cnt = atomic_read(&dev->power.usage_count); 1337 ref_cnt = atomic_read(&dev->power.usage_count);
1341 } while (ref_cnt != target_ref_cnt && !nvgpu_timeout_expired(&timeout)); 1338 } while (ref_cnt != target_ref_cnt && !nvgpu_timeout_expired(&timeout));
1342 1339
@@ -1362,11 +1359,11 @@ int __gk20a_do_idle(struct device *dev, bool force_reset)
1362 pm_runtime_put_sync(dev); 1359 pm_runtime_put_sync(dev);
1363 1360
1364 /* add sufficient delay to allow GPU to rail gate */ 1361 /* add sufficient delay to allow GPU to rail gate */
1365 msleep(platform->railgate_delay); 1362 nvgpu_msleep(platform->railgate_delay);
1366 1363
1367 /* check in loop if GPU is railgated or not */ 1364 /* check in loop if GPU is railgated or not */
1368 do { 1365 do {
1369 msleep(1); 1366 nvgpu_msleep(1);
1370 is_railgated = platform->is_railgated(dev); 1367 is_railgated = platform->is_railgated(dev);
1371 } while (!is_railgated && !nvgpu_timeout_expired(&timeout)); 1368 } while (!is_railgated && !nvgpu_timeout_expired(&timeout));
1372 1369
@@ -1397,7 +1394,7 @@ int __gk20a_do_idle(struct device *dev, bool force_reset)
1397 /* railgate GPU */ 1394 /* railgate GPU */
1398 platform->railgate(dev); 1395 platform->railgate(dev);
1399 1396
1400 udelay(10); 1397 nvgpu_udelay(10);
1401 1398
1402 g->forced_reset = true; 1399 g->forced_reset = true;
1403 return 0; 1400 return 0;