diff options
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 33 |
1 files changed, 32 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index c606e027..0cc29026 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -40,6 +40,7 @@ | |||
40 | #include <linux/clk/tegra.h> | 40 | #include <linux/clk/tegra.h> |
41 | #include <linux/kthread.h> | 41 | #include <linux/kthread.h> |
42 | #include <linux/platform/tegra/common.h> | 42 | #include <linux/platform/tegra/common.h> |
43 | #include <linux/reset.h> | ||
43 | 44 | ||
44 | #include <linux/sched.h> | 45 | #include <linux/sched.h> |
45 | 46 | ||
@@ -1166,7 +1167,10 @@ static void gk20a_pm_shutdown(struct platform_device *pdev) | |||
1166 | #endif | 1167 | #endif |
1167 | 1168 | ||
1168 | /* Be ready for rail-gate after this point */ | 1169 | /* Be ready for rail-gate after this point */ |
1169 | gk20a_pm_prepare_poweroff(&pdev->dev); | 1170 | if (gk20a_gpu_is_virtual(pdev)) |
1171 | vgpu_pm_prepare_poweroff(&pdev->dev); | ||
1172 | else | ||
1173 | gk20a_pm_prepare_poweroff(&pdev->dev); | ||
1170 | } | 1174 | } |
1171 | 1175 | ||
1172 | #ifdef CONFIG_PM | 1176 | #ifdef CONFIG_PM |
@@ -1295,6 +1299,10 @@ static int gk20a_pm_init(struct platform_device *dev) | |||
1295 | if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) | 1299 | if (IS_ENABLED(CONFIG_PM_GENERIC_DOMAINS)) |
1296 | err = gk20a_pm_initialise_domain(dev); | 1300 | err = gk20a_pm_initialise_domain(dev); |
1297 | 1301 | ||
1302 | platform->reset_control = devm_reset_control_get(&dev->dev, NULL); | ||
1303 | if (IS_ERR(platform->reset_control)) | ||
1304 | platform->reset_control = NULL; | ||
1305 | |||
1298 | return err; | 1306 | return err; |
1299 | } | 1307 | } |
1300 | 1308 | ||
@@ -1452,6 +1460,10 @@ static int gk20a_probe(struct platform_device *dev) | |||
1452 | gk20a->timeouts_enabled = true; | 1460 | gk20a->timeouts_enabled = true; |
1453 | gk20a->ch_wdt_enabled = true; | 1461 | gk20a->ch_wdt_enabled = true; |
1454 | 1462 | ||
1463 | gk20a->timeslice_low_priority_us = 1300; | ||
1464 | gk20a->timeslice_medium_priority_us = 2600; | ||
1465 | gk20a->timeslice_high_priority_us = 5200; | ||
1466 | |||
1455 | /* Set up initial power settings. For non-slicon platforms, disable * | 1467 | /* Set up initial power settings. For non-slicon platforms, disable * |
1456 | * power features and for silicon platforms, read from platform data */ | 1468 | * power features and for silicon platforms, read from platform data */ |
1457 | gk20a->slcg_enabled = | 1469 | gk20a->slcg_enabled = |
@@ -1504,6 +1516,25 @@ static int gk20a_probe(struct platform_device *dev) | |||
1504 | S_IRUGO|S_IWUSR, | 1516 | S_IRUGO|S_IWUSR, |
1505 | platform->debugfs, | 1517 | platform->debugfs, |
1506 | &gk20a->mm.disable_bigpage); | 1518 | &gk20a->mm.disable_bigpage); |
1519 | |||
1520 | gk20a->debugfs_timeslice_low_priority_us = | ||
1521 | debugfs_create_u32("timeslice_low_priority_us", | ||
1522 | S_IRUGO|S_IWUSR, | ||
1523 | platform->debugfs, | ||
1524 | &gk20a->timeslice_low_priority_us); | ||
1525 | |||
1526 | gk20a->debugfs_timeslice_medium_priority_us = | ||
1527 | debugfs_create_u32("timeslice_medium_priority_us", | ||
1528 | S_IRUGO|S_IWUSR, | ||
1529 | platform->debugfs, | ||
1530 | &gk20a->timeslice_medium_priority_us); | ||
1531 | |||
1532 | gk20a->debugfs_timeslice_high_priority_us = | ||
1533 | debugfs_create_u32("timeslice_high_priority_us", | ||
1534 | S_IRUGO|S_IWUSR, | ||
1535 | platform->debugfs, | ||
1536 | &gk20a->timeslice_high_priority_us); | ||
1537 | |||
1507 | gr_gk20a_debugfs_init(gk20a); | 1538 | gr_gk20a_debugfs_init(gk20a); |
1508 | gk20a_pmu_debugfs_init(dev); | 1539 | gk20a_pmu_debugfs_init(dev); |
1509 | gk20a_cde_debugfs_init(dev); | 1540 | gk20a_cde_debugfs_init(dev); |