summaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2017-12-28 17:08:25 -0500
committermobile promotions <svcmobile_promotions@nvidia.com>2018-01-02 16:53:05 -0500
commit14fa8207e2f7feb36f8fa284b94859e05136eb0f (patch)
treebe05914b21122b80b56f2dc8f0f1799321ca1fc1 /drivers
parent4f67a794ddbb9e5c1ce66461fabdf3f27708945a (diff)
gpu: nvgpu: Remove TSG required flag
Remove nvgpu internal flag indicating that TSGs are required. We now require TSGs always. This also fixes a regression where CE channels were back to using bare channels on gp106. Bug 1842197 Change-Id: Id359e5a455fb324278636bb8994b583936490ffd Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/1628481 Reviewed-by: Automatic_Commit_Validation_User Reviewed-by: Deepak Nibade <dnibade@nvidia.com> GVS: Gerrit_Virtual_Submit Reviewed-by: Seshendra Gadagottu <sgadagottu@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com> Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/gpu/nvgpu/common/linux/driver_common.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/pci.c4
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gk20a.h3
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c2
-rw-r--r--drivers/gpu/nvgpu/common/linux/vgpu/platform_vgpu_tegra.c2
-rw-r--r--drivers/gpu/nvgpu/gk20a/ce2_gk20a.c22
-rw-r--r--drivers/gpu/nvgpu/include/nvgpu/enabled.h2
9 files changed, 9 insertions, 32 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/driver_common.c b/drivers/gpu/nvgpu/common/linux/driver_common.c
index 4de0658b..f2373e00 100644
--- a/drivers/gpu/nvgpu/common/linux/driver_common.c
+++ b/drivers/gpu/nvgpu/common/linux/driver_common.c
@@ -182,8 +182,6 @@ static void nvgpu_init_mm_vars(struct gk20a *g)
182 platform->unified_memory); 182 platform->unified_memory);
183 __nvgpu_set_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES, 183 __nvgpu_set_enabled(g, NVGPU_MM_UNIFY_ADDRESS_SPACES,
184 platform->unify_address_spaces); 184 platform->unify_address_spaces);
185 __nvgpu_set_enabled(g, NVGPU_MM_CE_TSG_REQUIRED,
186 platform->tsg_required);
187 185
188 nvgpu_mutex_init(&g->mm.tlb_lock); 186 nvgpu_mutex_init(&g->mm.tlb_lock);
189 nvgpu_mutex_init(&g->mm.priv_lock); 187 nvgpu_mutex_init(&g->mm.priv_lock);
diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c
index 342fa5af..928d8354 100644
--- a/drivers/gpu/nvgpu/common/linux/pci.c
+++ b/drivers/gpu/nvgpu/common/linux/pci.c
@@ -244,7 +244,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
244 .vbios_min_version = 0x88001e00, 244 .vbios_min_version = 0x88001e00,
245 .hardcode_sw_threshold = false, 245 .hardcode_sw_threshold = false,
246 .run_preos = true, 246 .run_preos = true,
247 .tsg_required = true,
248 }, 247 },
249 { /* DEVICE=PG503 SKU 200 ES */ 248 { /* DEVICE=PG503 SKU 200 ES */
250 /* ptimer src frequency in hz */ 249 /* ptimer src frequency in hz */
@@ -279,7 +278,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
279 .vbios_min_version = 0x88001e00, 278 .vbios_min_version = 0x88001e00,
280 .hardcode_sw_threshold = false, 279 .hardcode_sw_threshold = false,
281 .run_preos = true, 280 .run_preos = true,
282 .tsg_required = true,
283 }, 281 },
284 { 282 {
285 /* ptimer src frequency in hz */ 283 /* ptimer src frequency in hz */
@@ -314,7 +312,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
314 .vbios_min_version = 0x88000126, 312 .vbios_min_version = 0x88000126,
315 .hardcode_sw_threshold = false, 313 .hardcode_sw_threshold = false,
316 .run_preos = true, 314 .run_preos = true,
317 .tsg_required = true,
318 }, 315 },
319 { /* SKU250 */ 316 { /* SKU250 */
320 /* ptimer src frequency in hz */ 317 /* ptimer src frequency in hz */
@@ -349,7 +346,6 @@ static struct gk20a_platform nvgpu_pci_device[] = {
349 .vbios_min_version = 0x1, 346 .vbios_min_version = 0x1,
350 .hardcode_sw_threshold = false, 347 .hardcode_sw_threshold = false,
351 .run_preos = true, 348 .run_preos = true,
352 .tsg_required = true,
353 }, 349 },
354}; 350};
355 351
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h
index 47ada890..b8201954 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gk20a.h
+++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a.h
@@ -224,9 +224,6 @@ struct gk20a_platform {
224 /* unified or split memory with separate vidmem? */ 224 /* unified or split memory with separate vidmem? */
225 bool unified_memory; 225 bool unified_memory;
226 226
227 /* true if all channels must be in TSG */
228 bool tsg_required;
229
230 /* minimum supported VBIOS version */ 227 /* minimum supported VBIOS version */
231 u32 vbios_min_version; 228 u32 vbios_min_version;
232 229
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
index d323b248..c40eafe4 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c
@@ -972,6 +972,4 @@ struct gk20a_platform gm20b_tegra_platform = {
972 .soc_name = "tegra21x", 972 .soc_name = "tegra21x",
973 973
974 .unified_memory = true, 974 .unified_memory = true,
975
976 .tsg_required = true,
977}; 975};
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
index 8e4cc0a2..8a964caf 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c
@@ -417,8 +417,6 @@ struct gk20a_platform gp10b_tegra_platform = {
417 .soc_name = "tegra18x", 417 .soc_name = "tegra18x",
418 418
419 .unified_memory = true, 419 .unified_memory = true,
420
421 .tsg_required = true,
422}; 420};
423 421
424 422
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
index 4f4381a5..b9298aee 100644
--- a/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/platform_gv11b_tegra.c
@@ -222,8 +222,6 @@ struct gk20a_platform t19x_gpu_tegra_platform = {
222 .honors_aperture = true, 222 .honors_aperture = true,
223 .unified_memory = true, 223 .unified_memory = true,
224 224
225 .tsg_required = true,
226
227 .reset_assert = gp10b_tegra_reset_assert, 225 .reset_assert = gp10b_tegra_reset_assert,
228 .reset_deassert = gp10b_tegra_reset_deassert, 226 .reset_deassert = gp10b_tegra_reset_deassert,
229}; 227};
diff --git a/drivers/gpu/nvgpu/common/linux/vgpu/platform_vgpu_tegra.c b/drivers/gpu/nvgpu/common/linux/vgpu/platform_vgpu_tegra.c
index 642676b3..830b04ac 100644
--- a/drivers/gpu/nvgpu/common/linux/vgpu/platform_vgpu_tegra.c
+++ b/drivers/gpu/nvgpu/common/linux/vgpu/platform_vgpu_tegra.c
@@ -66,6 +66,4 @@ struct gk20a_platform vgpu_tegra_platform = {
66 .devfreq_governor = "userspace", 66 .devfreq_governor = "userspace",
67 67
68 .virtual_dev = true, 68 .virtual_dev = true,
69
70 .tsg_required = true,
71}; 69};
diff --git a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
index 99c518b5..5e2fc6b3 100644
--- a/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
+++ b/drivers/gpu/nvgpu/gk20a/ce2_gk20a.c
@@ -456,14 +456,12 @@ u32 gk20a_ce_create_context(struct gk20a *g,
456 456
457 ce_ctx->vm = g->mm.ce.vm; 457 ce_ctx->vm = g->mm.ce.vm;
458 458
459 if (nvgpu_is_enabled(g, NVGPU_MM_CE_TSG_REQUIRED)) { 459 /* allocate a tsg if needed */
460 /* allocate a tsg if needed */ 460 ce_ctx->tsg = gk20a_tsg_open(g);
461 ce_ctx->tsg = gk20a_tsg_open(g);
462 461
463 if (!ce_ctx->tsg) { 462 if (!ce_ctx->tsg) {
464 nvgpu_err(g, "ce: gk20a tsg not available"); 463 nvgpu_err(g, "ce: gk20a tsg not available");
465 goto end; 464 goto end;
466 }
467 } 465 }
468 466
469 /* always kernel client needs privileged channel */ 467 /* always kernel client needs privileged channel */
@@ -481,12 +479,10 @@ u32 gk20a_ce_create_context(struct gk20a *g,
481 goto end; 479 goto end;
482 } 480 }
483 481
484 if (nvgpu_is_enabled(g, NVGPU_MM_CE_TSG_REQUIRED)) { 482 err = gk20a_tsg_bind_channel(ce_ctx->tsg, ce_ctx->ch);
485 err = gk20a_tsg_bind_channel(ce_ctx->tsg, ce_ctx->ch); 483 if (err) {
486 if (err) { 484 nvgpu_err(g, "ce: unable to bind to tsg");
487 nvgpu_err(g, "ce: unable to bind to tsg"); 485 goto end;
488 goto end;
489 }
490 } 486 }
491 487
492 /* allocate gpfifo (1024 should be more than enough) */ 488 /* allocate gpfifo (1024 should be more than enough) */
diff --git a/drivers/gpu/nvgpu/include/nvgpu/enabled.h b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
index 4f31e3e2..3a5caf0c 100644
--- a/drivers/gpu/nvgpu/include/nvgpu/enabled.h
+++ b/drivers/gpu/nvgpu/include/nvgpu/enabled.h
@@ -63,8 +63,6 @@ struct gk20a;
63#define NVGPU_MM_HONORS_APERTURE 17 63#define NVGPU_MM_HONORS_APERTURE 17
64/* unified or split memory with separate vidmem? */ 64/* unified or split memory with separate vidmem? */
65#define NVGPU_MM_UNIFIED_MEMORY 18 65#define NVGPU_MM_UNIFIED_MEMORY 18
66/* kernel mode ce vidmem clearing channels need to be in a tsg */
67#define NVGPU_MM_CE_TSG_REQUIRED 19
68/* User-space managed address spaces support */ 66/* User-space managed address spaces support */
69#define NVGPU_SUPPORT_USERSPACE_MANAGED_AS 20 67#define NVGPU_SUPPORT_USERSPACE_MANAGED_AS 20
70/* IO coherence support is available */ 68/* IO coherence support is available */