diff options
author | Konsta Holtta <kholtta@nvidia.com> | 2017-06-05 10:40:44 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-06 14:05:03 -0400 |
commit | 80197d2c9daa8e2320cc0b15741904eb3c1b9ba7 (patch) | |
tree | f6c5d33058f59df536860b4b1209950a63dda5be /drivers/gpu/nvgpu/tegra | |
parent | 26487b82df0c6604cc40fd6480f7ad7ed4e3efb0 (diff) |
gpu: nvgpu: split vidmem_is_vidmem
As the vidmem_is_vidmem flag has got two separate meanings in one bit,
split it in two bits into the enabled() API:
Add NVGPU_MM_HONORS_APERTURE bit, which is the same as vidmem_is_vidmem
with its original meaning, and use it to test which aperture bits to
write to hardware.
Add NVGPU_MM_UNIFIED_MEMORY bit, which has the opposite meaning: that
the GPU shares the SoC memory. When this flag is false, the GPU has its
own local video memory.
Jira NVGPU-86
Change-Id: I2d0bed3b1ede5a712be99323d3035b154bb23c3a
Signed-off-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-on: http://git-master/r/1496080
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/tegra')
-rw-r--r-- | drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c | 4 |
2 files changed, 3 insertions, 7 deletions
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c index 96312a00..8a83f7d0 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gk20a_tegra.c | |||
@@ -934,8 +934,6 @@ static int gk20a_tegra_probe(struct device *dev) | |||
934 | if (tegra_get_chip_id() == TEGRA132) | 934 | if (tegra_get_chip_id() == TEGRA132) |
935 | platform->soc_name = "tegra13x"; | 935 | platform->soc_name = "tegra13x"; |
936 | 936 | ||
937 | platform->g->mm.vidmem_is_vidmem = platform->vidmem_is_vidmem; | ||
938 | |||
939 | gk20a_tegra_get_clocks(dev); | 937 | gk20a_tegra_get_clocks(dev); |
940 | nvgpu_linux_init_clk_support(platform->g); | 938 | nvgpu_linux_init_clk_support(platform->g); |
941 | gk20a_tegra_init_secure_alloc(platform->g); | 939 | gk20a_tegra_init_secure_alloc(platform->g); |
@@ -1051,7 +1049,7 @@ struct gk20a_platform gk20a_tegra_platform = { | |||
1051 | 1049 | ||
1052 | .soc_name = "tegra12x", | 1050 | .soc_name = "tegra12x", |
1053 | 1051 | ||
1054 | .vidmem_is_vidmem = false, | 1052 | .unified_memory = true, |
1055 | }; | 1053 | }; |
1056 | 1054 | ||
1057 | struct gk20a_platform gm20b_tegra_platform = { | 1055 | struct gk20a_platform gm20b_tegra_platform = { |
@@ -1123,5 +1121,5 @@ struct gk20a_platform gm20b_tegra_platform = { | |||
1123 | 1121 | ||
1124 | .soc_name = "tegra21x", | 1122 | .soc_name = "tegra21x", |
1125 | 1123 | ||
1126 | .vidmem_is_vidmem = false, | 1124 | .unified_memory = true, |
1127 | }; | 1125 | }; |
diff --git a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c index b7cbf56e..8b530fac 100644 --- a/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/tegra/linux/platform_gp10b_tegra.c | |||
@@ -161,8 +161,6 @@ static int gp10b_tegra_probe(struct device *dev) | |||
161 | platform->g->gr.t18x.ctx_vars.force_preemption_gfxp = false; | 161 | platform->g->gr.t18x.ctx_vars.force_preemption_gfxp = false; |
162 | platform->g->gr.t18x.ctx_vars.force_preemption_cilp = false; | 162 | platform->g->gr.t18x.ctx_vars.force_preemption_cilp = false; |
163 | 163 | ||
164 | platform->g->mm.vidmem_is_vidmem = platform->vidmem_is_vidmem; | ||
165 | |||
166 | gp10b_tegra_get_clocks(dev); | 164 | gp10b_tegra_get_clocks(dev); |
167 | nvgpu_linux_init_clk_support(platform->g); | 165 | nvgpu_linux_init_clk_support(platform->g); |
168 | gk20a_tegra_init_secure_alloc(platform->g); | 166 | gk20a_tegra_init_secure_alloc(platform->g); |
@@ -436,7 +434,7 @@ struct gk20a_platform gp10b_tegra_platform = { | |||
436 | 434 | ||
437 | .soc_name = "tegra18x", | 435 | .soc_name = "tegra18x", |
438 | 436 | ||
439 | .vidmem_is_vidmem = false, | 437 | .unified_memory = true, |
440 | }; | 438 | }; |
441 | 439 | ||
442 | 440 | ||