diff options
author | Lakshmanan M <lm@nvidia.com> | 2016-06-29 06:36:39 -0400 |
---|---|---|
committer | Vijayakumar Subbu <vsubbu@nvidia.com> | 2016-07-20 06:09:28 -0400 |
commit | 89aecd1202b49727e940069f2a6feb5c3cf4c927 (patch) | |
tree | 8a0d3a493b389167ce1d93e55f23e114ec2cbd38 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | f6ebdc5f2916706f7a61983567420e0985faeeb1 (diff) |
gpu: nvgpu: Add nvgpu infra to allow kernel to create privileged CE channels
Added interface to allow kernel to create privileged CE channels for
page migration and clearing support between sysmem and videmem.
JIRA DNVGPU-53
Change-Id: I3e18d18403809c9e64fa45d40b6c4e3844992506
Signed-off-by: Lakshmanan M <lm@nvidia.com>
Reviewed-on: http://git-master/r/1173085
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index 50f67262..04f82033 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -773,6 +773,7 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
773 | { | 773 | { |
774 | struct gk20a *g = get_gk20a(dev); | 774 | struct gk20a *g = get_gk20a(dev); |
775 | int ret = 0; | 775 | int ret = 0; |
776 | struct gk20a_platform *platform = gk20a_get_platform(dev); | ||
776 | 777 | ||
777 | gk20a_dbg_fn(""); | 778 | gk20a_dbg_fn(""); |
778 | 779 | ||
@@ -786,6 +787,9 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) | |||
786 | /* cancel any pending cde work */ | 787 | /* cancel any pending cde work */ |
787 | gk20a_cde_suspend(g); | 788 | gk20a_cde_suspend(g); |
788 | 789 | ||
790 | if (platform->has_ce) | ||
791 | gk20a_ce_suspend(g); | ||
792 | |||
789 | ret = gk20a_channel_suspend(g); | 793 | ret = gk20a_channel_suspend(g); |
790 | if (ret) | 794 | if (ret) |
791 | goto done; | 795 | goto done; |
@@ -996,6 +1000,11 @@ int gk20a_pm_finalize_poweron(struct device *dev) | |||
996 | if (platform->has_cde) | 1000 | if (platform->has_cde) |
997 | gk20a_init_cde_support(g); | 1001 | gk20a_init_cde_support(g); |
998 | 1002 | ||
1003 | if (platform->has_ce) | ||
1004 | gk20a_init_ce_support(g); | ||
1005 | |||
1006 | gk20a_init_mm_ce_context(g); | ||
1007 | |||
999 | enable_irq(g->irq_stall); | 1008 | enable_irq(g->irq_stall); |
1000 | if (g->irq_stall != g->irq_nonstall) | 1009 | if (g->irq_stall != g->irq_nonstall) |
1001 | enable_irq(g->irq_nonstall); | 1010 | enable_irq(g->irq_nonstall); |
@@ -1658,6 +1667,7 @@ static int gk20a_probe(struct platform_device *dev) | |||
1658 | gk20a_pmu_debugfs_init(&dev->dev); | 1667 | gk20a_pmu_debugfs_init(&dev->dev); |
1659 | gk20a_railgating_debugfs_init(&dev->dev); | 1668 | gk20a_railgating_debugfs_init(&dev->dev); |
1660 | gk20a_cde_debugfs_init(&dev->dev); | 1669 | gk20a_cde_debugfs_init(&dev->dev); |
1670 | gk20a_ce_debugfs_init(&dev->dev); | ||
1661 | gk20a_alloc_debugfs_init(dev); | 1671 | gk20a_alloc_debugfs_init(dev); |
1662 | gk20a_mm_debugfs_init(&dev->dev); | 1672 | gk20a_mm_debugfs_init(&dev->dev); |
1663 | gk20a_fifo_debugfs_init(&dev->dev); | 1673 | gk20a_fifo_debugfs_init(&dev->dev); |
@@ -1693,6 +1703,9 @@ static int __exit gk20a_remove(struct platform_device *pdev) | |||
1693 | if (g->remove_support) | 1703 | if (g->remove_support) |
1694 | g->remove_support(dev); | 1704 | g->remove_support(dev); |
1695 | 1705 | ||
1706 | if (platform->has_ce) | ||
1707 | gk20a_ce_destroy(g); | ||
1708 | |||
1696 | gk20a_user_deinit(dev, &nvgpu_class); | 1709 | gk20a_user_deinit(dev, &nvgpu_class); |
1697 | 1710 | ||
1698 | debugfs_remove_recursive(platform->debugfs); | 1711 | debugfs_remove_recursive(platform->debugfs); |