summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2016-09-07 17:21:16 -0400
committermobile promotions <svcmobile_promotions@nvidia.com>2017-03-24 12:08:23 -0400
commit81660ab58ce695b79c94e145745512516c592afe (patch)
treeb297b9efa08c7d8718053689b9aefea50da75987 /drivers/gpu/nvgpu/gk20a
parentfd02ab4d540ef473df1fe189653cc521876663d6 (diff)
gpu: nvgpu: Enable CE always
All GPUs have a copy engine. So delete the flag has_ce, because it's always true. JIRA NVGPU-16 Change-Id: I89db74c7cf66b24db84301b79832862ef28100b9 Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/1325355 Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a')
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.c3
-rw-r--r--drivers/gpu/nvgpu/gk20a/gk20a.c9
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.c13
-rw-r--r--drivers/gpu/nvgpu/gk20a/platform_gk20a.h2
4 files changed, 7 insertions, 20 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
index 698211ec..921ee6f8 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
@@ -718,9 +718,6 @@ void gk20a_ce_debugfs_init(struct device *dev)
718 struct gk20a_platform *platform = dev_get_drvdata(dev); 718 struct gk20a_platform *platform = dev_get_drvdata(dev);
719 struct gk20a *g = get_gk20a(dev); 719 struct gk20a *g = get_gk20a(dev);
720 720
721 if (!platform->has_ce)
722 return;
723
724 debugfs_create_u32("ce_app_ctx_count", S_IWUSR | S_IRUGO, 721 debugfs_create_u32("ce_app_ctx_count", S_IWUSR | S_IRUGO,
725 platform->debugfs, &g->ce_app.ctx_count); 722 platform->debugfs, &g->ce_app.ctx_count);
726 debugfs_create_u32("ce_app_state", S_IWUSR | S_IRUGO, 723 debugfs_create_u32("ce_app_state", S_IWUSR | S_IRUGO,
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c
index 59f16bf6..2046c08e 100644
--- a/drivers/gpu/nvgpu/gk20a/gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/gk20a.c
@@ -443,8 +443,7 @@ static int gk20a_pm_prepare_poweroff(struct device *dev)
443 /* cancel any pending cde work */ 443 /* cancel any pending cde work */
444 gk20a_cde_suspend(g); 444 gk20a_cde_suspend(g);
445 445
446 if (platform->has_ce) 446 gk20a_ce_suspend(g);
447 gk20a_ce_suspend(g);
448 447
449 ret = gk20a_channel_suspend(g); 448 ret = gk20a_channel_suspend(g);
450 if (ret) 449 if (ret)
@@ -710,8 +709,7 @@ int gk20a_pm_finalize_poweron(struct device *dev)
710 if (platform->has_cde) 709 if (platform->has_cde)
711 gk20a_init_cde_support(g); 710 gk20a_init_cde_support(g);
712 711
713 if (platform->has_ce) 712 gk20a_init_ce_support(g);
714 gk20a_init_ce_support(g);
715 713
716 gk20a_init_mm_ce_context(g); 714 gk20a_init_mm_ce_context(g);
717 715
@@ -1302,8 +1300,7 @@ static int __exit gk20a_remove(struct platform_device *pdev)
1302 if (g->remove_support) 1300 if (g->remove_support)
1303 g->remove_support(dev); 1301 g->remove_support(dev);
1304 1302
1305 if (platform->has_ce) 1303 gk20a_ce_destroy(g);
1306 gk20a_ce_destroy(g);
1307 1304
1308#ifdef CONFIG_ARCH_TEGRA_18x_SOC 1305#ifdef CONFIG_ARCH_TEGRA_18x_SOC
1309 nvgpu_clk_arb_cleanup_arbiter(g); 1306 nvgpu_clk_arb_cleanup_arbiter(g);
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
index b9217c2c..7b08387e 100644
--- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.c
@@ -807,15 +807,13 @@ static void gk20a_vidmem_destroy(struct gk20a *g)
807static void gk20a_remove_mm_ce_support(struct mm_gk20a *mm) 807static void gk20a_remove_mm_ce_support(struct mm_gk20a *mm)
808{ 808{
809 struct gk20a *g = gk20a_from_mm(mm); 809 struct gk20a *g = gk20a_from_mm(mm);
810 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
811 810
812 if (mm->vidmem.ce_ctx_id != (u32)~0) 811 if (mm->vidmem.ce_ctx_id != (u32)~0)
813 gk20a_ce_delete_context(g->dev, mm->vidmem.ce_ctx_id); 812 gk20a_ce_delete_context(g->dev, mm->vidmem.ce_ctx_id);
814 813
815 mm->vidmem.ce_ctx_id = (u32)~0; 814 mm->vidmem.ce_ctx_id = (u32)~0;
816 815
817 if (platform->has_ce) 816 gk20a_vm_remove_support_nofree(&mm->ce.vm);
818 gk20a_vm_remove_support_nofree(&mm->ce.vm);
819 817
820} 818}
821 819
@@ -991,7 +989,6 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
991{ 989{
992 struct mm_gk20a *mm = &g->mm; 990 struct mm_gk20a *mm = &g->mm;
993 int err; 991 int err;
994 struct gk20a_platform *platform = gk20a_get_platform(g->dev);
995 992
996 gk20a_dbg_fn(""); 993 gk20a_dbg_fn("");
997 994
@@ -1056,11 +1053,9 @@ int gk20a_init_mm_setup_sw(struct gk20a *g)
1056 if (err) 1053 if (err)
1057 return err; 1054 return err;
1058 1055
1059 if (platform->has_ce) { 1056 err = gk20a_init_ce_vm(mm);
1060 err = gk20a_init_ce_vm(mm); 1057 if (err)
1061 if (err) 1058 return err;
1062 return err;
1063 }
1064 1059
1065 /* set vm_alloc_share op here as gk20a_as_alloc_share needs it */ 1060 /* set vm_alloc_share op here as gk20a_as_alloc_share needs it */
1066 g->ops.mm.vm_alloc_share = gk20a_vm_alloc_share; 1061 g->ops.mm.vm_alloc_share = gk20a_vm_alloc_share;
diff --git a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
index d685639b..2d8c2bd7 100644
--- a/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
+++ b/drivers/gpu/nvgpu/gk20a/platform_gk20a.h
@@ -236,8 +236,6 @@ struct gk20a_platform {
236 236
237 bool has_cde; 237 bool has_cde;
238 238
239 bool has_ce;
240
241 /* soc name for finding firmware files */ 239 /* soc name for finding firmware files */
242 const char *soc_name; 240 const char *soc_name;
243 241