diff options
author | Terje Bergstrom <tbergstrom@nvidia.com> | 2018-02-09 17:42:07 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2018-02-15 00:43:43 -0500 |
commit | ec00a6c2db2b6e163c2bb1245584a2d009fa1252 (patch) | |
tree | 7676cdb8840ccbbac287e31b2a5087d210854a8f /drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | |
parent | 1582bdb5eeff44a93f53987080a652910d51c3c4 (diff) |
gpu: nvgpu: Use preallocated VPR buffer
To prevent deadlock while allocating VPR in nvgpu, allocate all the
needed VPR memory at probe time and use an internal allocator to
hand out space for VPR buffers.
Change-Id: I584b9a0f746d5d1dec021cdfbd6f26b4b92e4412
Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1655324
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c index 0b0ebeeb..2bca2bd5 100644 --- a/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c +++ b/drivers/gpu/nvgpu/common/linux/platform_gp10b_tegra.c | |||
@@ -137,6 +137,10 @@ static int gp10b_tegra_probe(struct device *dev) | |||
137 | return ret; | 137 | return ret; |
138 | #endif | 138 | #endif |
139 | 139 | ||
140 | ret = gk20a_tegra_init_secure_alloc(platform); | ||
141 | if (ret) | ||
142 | return ret; | ||
143 | |||
140 | platform->disable_bigpage = !device_is_iommuable(dev); | 144 | platform->disable_bigpage = !device_is_iommuable(dev); |
141 | 145 | ||
142 | platform->g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close | 146 | platform->g->gr.ctx_vars.dump_ctxsw_stats_on_channel_close |
@@ -149,16 +153,12 @@ static int gp10b_tegra_probe(struct device *dev) | |||
149 | 153 | ||
150 | gp10b_tegra_get_clocks(dev); | 154 | gp10b_tegra_get_clocks(dev); |
151 | nvgpu_linux_init_clk_support(platform->g); | 155 | nvgpu_linux_init_clk_support(platform->g); |
152 | gk20a_tegra_init_secure_alloc(platform->g); | ||
153 | 156 | ||
154 | return 0; | 157 | return 0; |
155 | } | 158 | } |
156 | 159 | ||
157 | static int gp10b_tegra_late_probe(struct device *dev) | 160 | static int gp10b_tegra_late_probe(struct device *dev) |
158 | { | 161 | { |
159 | /* Cause early VPR resize */ | ||
160 | gk20a_tegra_secure_page_alloc(dev); | ||
161 | |||
162 | return 0; | 162 | return 0; |
163 | } | 163 | } |
164 | 164 | ||
@@ -422,6 +422,8 @@ struct gk20a_platform gp10b_tegra_platform = { | |||
422 | .unified_memory = true, | 422 | .unified_memory = true, |
423 | 423 | ||
424 | .ltc_streamid = TEGRA_SID_GPUB, | 424 | .ltc_streamid = TEGRA_SID_GPUB, |
425 | |||
426 | .secure_buffer_size = 401408, | ||
425 | }; | 427 | }; |
426 | 428 | ||
427 | 429 | ||