From 001c7c3185d9b087f89f48a41bee27d2d06721f6 Mon Sep 17 00:00:00 2001 From: Terje Bergstrom Date: Thu, 22 Jun 2017 12:55:17 -0700 Subject: gpu: nvgpu: Per chip default big page size Make default big page size query a HAL op instead of per-platform constant. This allows querying for default big page size without accessing Linux specific gk20a_platform structure. JIRA NVGPU-38 Change-Id: Ibfbd1319764fdae5fdb06700fb64d23f6f3dd01a Signed-off-by: Terje Bergstrom Reviewed-on: https://git-master/r/1507928 Reviewed-by: Automatic_Commit_Validation_User GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/common/as.c | 3 +-- drivers/gpu/nvgpu/common/linux/pci.c | 8 -------- drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 2 -- drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 2 -- 4 files changed, 1 insertion(+), 14 deletions(-) (limited to 'drivers/gpu/nvgpu/common') diff --git a/drivers/gpu/nvgpu/common/as.c b/drivers/gpu/nvgpu/common/as.c index 99d18195..0ff5bc6c 100644 --- a/drivers/gpu/nvgpu/common/as.c +++ b/drivers/gpu/nvgpu/common/as.c @@ -49,8 +49,7 @@ static int gk20a_vm_alloc_share(struct gk20a_as_share *as_share, gk20a_dbg_fn(""); if (big_page_size == 0) { - big_page_size = - gk20a_get_platform(g->dev)->default_big_page_size; + big_page_size = g->ops.mm.get_default_big_page_size(); } else { if (!is_power_of_2(big_page_size)) return -EINVAL; diff --git a/drivers/gpu/nvgpu/common/linux/pci.c b/drivers/gpu/nvgpu/common/linux/pci.c index 87751351..5fcf717c 100644 --- a/drivers/gpu/nvgpu/common/linux/pci.c +++ b/drivers/gpu/nvgpu/common/linux/pci.c @@ -86,8 +86,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .is_railgated = nvgpu_pci_tegra_is_railgated, .clk_round_rate = nvgpu_pci_clk_round_rate, - .default_big_page_size = SZ_64K, - .ch_wdt_timeout_ms = 7000, .honors_aperture = true, @@ -121,8 +119,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .is_railgated = nvgpu_pci_tegra_is_railgated, .clk_round_rate = nvgpu_pci_clk_round_rate, - .default_big_page_size = SZ_64K, - .ch_wdt_timeout_ms = 7000, .honors_aperture = true, @@ -156,8 +152,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .is_railgated = nvgpu_pci_tegra_is_railgated, .clk_round_rate = nvgpu_pci_clk_round_rate, - .default_big_page_size = SZ_64K, - .ch_wdt_timeout_ms = 7000, .honors_aperture = true, @@ -191,8 +185,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { .is_railgated = nvgpu_pci_tegra_is_railgated, .clk_round_rate = nvgpu_pci_clk_round_rate, - .default_big_page_size = SZ_64K, - .ch_wdt_timeout_ms = 7000, .honors_aperture = true, diff --git a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c index fda3bc95..9652c1da 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c @@ -924,8 +924,6 @@ struct gk20a_platform gm20b_tegra_platform = { .force_reset_in_do_idle = false, - .default_big_page_size = SZ_128K, - .ch_wdt_timeout_ms = 5000, .probe = gk20a_tegra_probe, diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index ab2aa1c5..61b8053f 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c @@ -398,8 +398,6 @@ struct gk20a_platform gp10b_tegra_platform = { .dump_platform_dependencies = gk20a_tegra_debug_dump, - .default_big_page_size = SZ_64K, - .has_cde = true, .clk_round_rate = gp10b_round_clk_rate, -- cgit v1.2.2