From 89aecd1202b49727e940069f2a6feb5c3cf4c927 Mon Sep 17 00:00:00 2001 From: Lakshmanan M Date: Wed, 29 Jun 2016 16:06:39 +0530 Subject: 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 Reviewed-on: http://git-master/r/1173085 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu --- drivers/gpu/nvgpu/gk20a/gk20a.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c') 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) { struct gk20a *g = get_gk20a(dev); int ret = 0; + struct gk20a_platform *platform = gk20a_get_platform(dev); gk20a_dbg_fn(""); @@ -786,6 +787,9 @@ static int gk20a_pm_prepare_poweroff(struct device *dev) /* cancel any pending cde work */ gk20a_cde_suspend(g); + if (platform->has_ce) + gk20a_ce_suspend(g); + ret = gk20a_channel_suspend(g); if (ret) goto done; @@ -996,6 +1000,11 @@ int gk20a_pm_finalize_poweron(struct device *dev) if (platform->has_cde) gk20a_init_cde_support(g); + if (platform->has_ce) + gk20a_init_ce_support(g); + + gk20a_init_mm_ce_context(g); + enable_irq(g->irq_stall); if (g->irq_stall != g->irq_nonstall) enable_irq(g->irq_nonstall); @@ -1658,6 +1667,7 @@ static int gk20a_probe(struct platform_device *dev) gk20a_pmu_debugfs_init(&dev->dev); gk20a_railgating_debugfs_init(&dev->dev); gk20a_cde_debugfs_init(&dev->dev); + gk20a_ce_debugfs_init(&dev->dev); gk20a_alloc_debugfs_init(dev); gk20a_mm_debugfs_init(&dev->dev); gk20a_fifo_debugfs_init(&dev->dev); @@ -1693,6 +1703,9 @@ static int __exit gk20a_remove(struct platform_device *pdev) if (g->remove_support) g->remove_support(dev); + if (platform->has_ce) + gk20a_ce_destroy(g); + gk20a_user_deinit(dev, &nvgpu_class); debugfs_remove_recursive(platform->debugfs); -- cgit v1.2.2