From 81660ab58ce695b79c94e145745512516c592afe Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Wed, 7 Sep 2016 14:21:16 -0700 Subject: 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 Reviewed-on: http://git-master/r/1325355 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/gk20a/ce2_gk20a.c | 3 --- drivers/gpu/nvgpu/gk20a/gk20a.c | 9 +++------ drivers/gpu/nvgpu/gk20a/mm_gk20a.c | 13 ++++--------- drivers/gpu/nvgpu/gk20a/platform_gk20a.h | 2 -- drivers/gpu/nvgpu/pci.c | 8 -------- drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | 4 ---- drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c | 2 -- 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) struct gk20a_platform *platform = dev_get_drvdata(dev); struct gk20a *g = get_gk20a(dev); - if (!platform->has_ce) - return; - debugfs_create_u32("ce_app_ctx_count", S_IWUSR | S_IRUGO, platform->debugfs, &g->ce_app.ctx_count); 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) /* cancel any pending cde work */ gk20a_cde_suspend(g); - if (platform->has_ce) - gk20a_ce_suspend(g); + gk20a_ce_suspend(g); ret = gk20a_channel_suspend(g); if (ret) @@ -710,8 +709,7 @@ 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_ce_support(g); gk20a_init_mm_ce_context(g); @@ -1302,8 +1300,7 @@ 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_ce_destroy(g); #ifdef CONFIG_ARCH_TEGRA_18x_SOC 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) static void gk20a_remove_mm_ce_support(struct mm_gk20a *mm) { struct gk20a *g = gk20a_from_mm(mm); - struct gk20a_platform *platform = gk20a_get_platform(g->dev); if (mm->vidmem.ce_ctx_id != (u32)~0) gk20a_ce_delete_context(g->dev, mm->vidmem.ce_ctx_id); mm->vidmem.ce_ctx_id = (u32)~0; - if (platform->has_ce) - gk20a_vm_remove_support_nofree(&mm->ce.vm); + gk20a_vm_remove_support_nofree(&mm->ce.vm); } @@ -991,7 +989,6 @@ int gk20a_init_mm_setup_sw(struct gk20a *g) { struct mm_gk20a *mm = &g->mm; int err; - struct gk20a_platform *platform = gk20a_get_platform(g->dev); gk20a_dbg_fn(""); @@ -1056,11 +1053,9 @@ int gk20a_init_mm_setup_sw(struct gk20a *g) if (err) return err; - if (platform->has_ce) { - err = gk20a_init_ce_vm(mm); - if (err) - return err; - } + err = gk20a_init_ce_vm(mm); + if (err) + return err; /* set vm_alloc_share op here as gk20a_as_alloc_share needs it */ 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 { bool has_cde; - bool has_ce; - /* soc name for finding firmware files */ const char *soc_name; 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[] = { .ch_wdt_timeout_ms = 7000, - .has_ce = true, - .vidmem_is_vidmem = true, .vbios_min_version = 0x86063000, .hardcode_sw_threshold = true, @@ -117,8 +115,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .ch_wdt_timeout_ms = 7000, - .has_ce = true, - .vidmem_is_vidmem = true, .vbios_min_version = 0x86062d00, .hardcode_sw_threshold = true, @@ -151,8 +147,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .ch_wdt_timeout_ms = 7000, - .has_ce = true, - .vidmem_is_vidmem = true, .vbios_min_version = 0x86063000, .hardcode_sw_threshold = true, @@ -185,8 +179,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .ch_wdt_timeout_ms = 7000, - .has_ce = true, - .vidmem_is_vidmem = true, .vbios_min_version = 0x86064700, .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 = { .secure_page_alloc = gk20a_tegra_secure_page_alloc, .dump_platform_dependencies = gk20a_tegra_debug_dump, - .has_ce = true, - .soc_name = "tegra12x", .vidmem_is_vidmem = false, @@ -1141,8 +1139,6 @@ struct gk20a_platform gm20b_tegra_platform = { .has_cde = true, - .has_ce = true, - .soc_name = "tegra21x", .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 = { .has_cde = true, - .has_ce = true, - .clk_round_rate = gp10b_round_clk_rate, .get_clk_freqs = gp10b_clk_get_freqs, -- cgit v1.2.2