diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2017-06-22 15:55:17 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-30 21:34:59 -0400 |
commit | 001c7c3185d9b087f89f48a41bee27d2d06721f6 (patch) | |
tree | c869be82279688a5dbe5d1145da09ca2323aef92 /drivers/gpu/nvgpu/common | |
parent | 82c0c96290602b1baf296133c7f55ae1848e433a (diff) |
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 <tbergstrom@nvidia.com>
Reviewed-on: https://git-master/r/1507928
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Diffstat (limited to 'drivers/gpu/nvgpu/common')
-rw-r--r-- | drivers/gpu/nvgpu/common/as.c | 3 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/pci.c | 8 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gk20a_tegra.c | 2 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 2 |
4 files changed, 1 insertions, 14 deletions
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, | |||
49 | gk20a_dbg_fn(""); | 49 | gk20a_dbg_fn(""); |
50 | 50 | ||
51 | if (big_page_size == 0) { | 51 | if (big_page_size == 0) { |
52 | big_page_size = | 52 | big_page_size = g->ops.mm.get_default_big_page_size(); |
53 | gk20a_get_platform(g->dev)->default_big_page_size; | ||
54 | } else { | 53 | } else { |
55 | if (!is_power_of_2(big_page_size)) | 54 | if (!is_power_of_2(big_page_size)) |
56 | return -EINVAL; | 55 | 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[] = { | |||
86 | .is_railgated = nvgpu_pci_tegra_is_railgated, | 86 | .is_railgated = nvgpu_pci_tegra_is_railgated, |
87 | .clk_round_rate = nvgpu_pci_clk_round_rate, | 87 | .clk_round_rate = nvgpu_pci_clk_round_rate, |
88 | 88 | ||
89 | .default_big_page_size = SZ_64K, | ||
90 | |||
91 | .ch_wdt_timeout_ms = 7000, | 89 | .ch_wdt_timeout_ms = 7000, |
92 | 90 | ||
93 | .honors_aperture = true, | 91 | .honors_aperture = true, |
@@ -121,8 +119,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
121 | .is_railgated = nvgpu_pci_tegra_is_railgated, | 119 | .is_railgated = nvgpu_pci_tegra_is_railgated, |
122 | .clk_round_rate = nvgpu_pci_clk_round_rate, | 120 | .clk_round_rate = nvgpu_pci_clk_round_rate, |
123 | 121 | ||
124 | .default_big_page_size = SZ_64K, | ||
125 | |||
126 | .ch_wdt_timeout_ms = 7000, | 122 | .ch_wdt_timeout_ms = 7000, |
127 | 123 | ||
128 | .honors_aperture = true, | 124 | .honors_aperture = true, |
@@ -156,8 +152,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
156 | .is_railgated = nvgpu_pci_tegra_is_railgated, | 152 | .is_railgated = nvgpu_pci_tegra_is_railgated, |
157 | .clk_round_rate = nvgpu_pci_clk_round_rate, | 153 | .clk_round_rate = nvgpu_pci_clk_round_rate, |
158 | 154 | ||
159 | .default_big_page_size = SZ_64K, | ||
160 | |||
161 | .ch_wdt_timeout_ms = 7000, | 155 | .ch_wdt_timeout_ms = 7000, |
162 | 156 | ||
163 | .honors_aperture = true, | 157 | .honors_aperture = true, |
@@ -191,8 +185,6 @@ static struct gk20a_platform nvgpu_pci_device[] = { | |||
191 | .is_railgated = nvgpu_pci_tegra_is_railgated, | 185 | .is_railgated = nvgpu_pci_tegra_is_railgated, |
192 | .clk_round_rate = nvgpu_pci_clk_round_rate, | 186 | .clk_round_rate = nvgpu_pci_clk_round_rate, |
193 | 187 | ||
194 | .default_big_page_size = SZ_64K, | ||
195 | |||
196 | .ch_wdt_timeout_ms = 7000, | 188 | .ch_wdt_timeout_ms = 7000, |
197 | 189 | ||
198 | .honors_aperture = true, | 190 | .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 = { | |||
924 | 924 | ||
925 | .force_reset_in_do_idle = false, | 925 | .force_reset_in_do_idle = false, |
926 | 926 | ||
927 | .default_big_page_size = SZ_128K, | ||
928 | |||
929 | .ch_wdt_timeout_ms = 5000, | 927 | .ch_wdt_timeout_ms = 5000, |
930 | 928 | ||
931 | .probe = gk20a_tegra_probe, | 929 | .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 = { | |||
398 | 398 | ||
399 | .dump_platform_dependencies = gk20a_tegra_debug_dump, | 399 | .dump_platform_dependencies = gk20a_tegra_debug_dump, |
400 | 400 | ||
401 | .default_big_page_size = SZ_64K, | ||
402 | |||
403 | .has_cde = true, | 401 | .has_cde = true, |
404 | 402 | ||
405 | .clk_round_rate = gp10b_round_clk_rate, | 403 | .clk_round_rate = gp10b_round_clk_rate, |