summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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
-rw-r--r--drivers/gpu/nvgpu/pci.c8
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c4
-rw-r--r--drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c2
7 files changed, 7 insertions, 34 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
diff --git a/drivers/gpu/nvgpu/pci.c b/drivers/gpu/nvgpu/pci.c
index 1e66b7c9..114e9af7 100644
--- a/drivers/gpu/nvgpu/pci.c
+++ b/drivers/gpu/nvgpu/pci.c
@@ -83,8 +83,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
83 83
84 .ch_wdt_timeout_ms = 7000, 84 .ch_wdt_timeout_ms = 7000,
85 85
86 .has_ce = true,
87
88 .vidmem_is_vidmem = true, 86 .vidmem_is_vidmem = true,
89 .vbios_min_version = 0x86063000, 87 .vbios_min_version = 0x86063000,
90 .hardcode_sw_threshold = true, 88 .hardcode_sw_threshold = true,
@@ -117,8 +115,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
117 115
118 .ch_wdt_timeout_ms = 7000, 116 .ch_wdt_timeout_ms = 7000,
119 117
120 .has_ce = true,
121
122 .vidmem_is_vidmem = true, 118 .vidmem_is_vidmem = true,
123 .vbios_min_version = 0x86062d00, 119 .vbios_min_version = 0x86062d00,
124 .hardcode_sw_threshold = true, 120 .hardcode_sw_threshold = true,
@@ -151,8 +147,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
151 147
152 .ch_wdt_timeout_ms = 7000, 148 .ch_wdt_timeout_ms = 7000,
153 149
154 .has_ce = true,
155
156 .vidmem_is_vidmem = true, 150 .vidmem_is_vidmem = true,
157 .vbios_min_version = 0x86063000, 151 .vbios_min_version = 0x86063000,
158 .hardcode_sw_threshold = true, 152 .hardcode_sw_threshold = true,
@@ -185,8 +179,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
185 179
186 .ch_wdt_timeout_ms = 7000, 180 .ch_wdt_timeout_ms = 7000,
187 181
188 .has_ce = true,
189
190 .vidmem_is_vidmem = true, 182 .vidmem_is_vidmem = true,
191 .vbios_min_version = 0x86064700, 183 .vbios_min_version = 0x86064700,
192 .hardcode_sw_threshold = false, 184 .hardcode_sw_threshold = false,
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
index 538c2eb1..636495a8 100644
--- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c
@@ -1065,8 +1065,6 @@ struct gk20a_platform gk20a_tegra_platform = {
1065 .secure_page_alloc = gk20a_tegra_secure_page_alloc, 1065 .secure_page_alloc = gk20a_tegra_secure_page_alloc,
1066 .dump_platform_dependencies = gk20a_tegra_debug_dump, 1066 .dump_platform_dependencies = gk20a_tegra_debug_dump,
1067 1067
1068 .has_ce = true,
1069
1070 .soc_name = "tegra12x", 1068 .soc_name = "tegra12x",
1071 1069
1072 .vidmem_is_vidmem = false, 1070 .vidmem_is_vidmem = false,
@@ -1141,8 +1139,6 @@ struct gk20a_platform gm20b_tegra_platform = {
1141 1139
1142 .has_cde = true, 1140 .has_cde = true,
1143 1141
1144 .has_ce = true,
1145
1146 .soc_name = "tegra21x", 1142 .soc_name = "tegra21x",
1147 1143
1148 .vidmem_is_vidmem = false, 1144 .vidmem_is_vidmem = false,
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
index 8e8792f6..e499627f 100644
--- a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c
@@ -427,8 +427,6 @@ struct gk20a_platform gp10b_tegra_platform = {
427 427
428 .has_cde = true, 428 .has_cde = true,
429 429
430 .has_ce = true,
431
432 .clk_round_rate = gp10b_round_clk_rate, 430 .clk_round_rate = gp10b_round_clk_rate,
433 .get_clk_freqs = gp10b_clk_get_freqs, 431 .get_clk_freqs = gp10b_clk_get_freqs,
434 432