diff options
author | seshendra Gadagottu <sgadagottu@nvidia.com> | 2017-06-22 19:25:41 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-10-18 17:54:32 -0400 |
commit | bee9c830c7898ceebf8c396b40598350229a7203 (patch) | |
tree | 694da4cbff9a83922b3073c4f4d0bcce914651e2 /drivers/gpu/nvgpu/gk20a/gk20a.c | |
parent | e039dcbc9dd7d0c47895bdbb49cdc3e1d11a3cae (diff) |
gpu: nvgpu: allocate syncpoint read map only once
Allocate syncpt_mem only if is not allocated.
JIRA GPUT19X-2
Change-Id: I081d27bb784fbe653890b5f8d36a4295c7ccc19b
Signed-off-by: seshendra Gadagottu <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1580731
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/gk20a.c')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/gk20a.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/gk20a.c b/drivers/gpu/nvgpu/gk20a/gk20a.c index a4becda0..e1bf2b4b 100644 --- a/drivers/gpu/nvgpu/gk20a/gk20a.c +++ b/drivers/gpu/nvgpu/gk20a/gk20a.c | |||
@@ -325,9 +325,11 @@ int gk20a_finalize_poweron(struct gk20a *g) | |||
325 | 325 | ||
326 | #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU) | 326 | #if defined(CONFIG_TEGRA_GK20A_NVHOST) && defined(CONFIG_TEGRA_19x_GPU) |
327 | if (gk20a_platform_has_syncpoints(g) && g->syncpt_unit_size) { | 327 | if (gk20a_platform_has_syncpoints(g) && g->syncpt_unit_size) { |
328 | nr_pages = DIV_ROUND_UP(g->syncpt_unit_size, PAGE_SIZE); | 328 | if (!nvgpu_mem_is_valid(&g->syncpt_mem)) { |
329 | __nvgpu_mem_create_from_phys(g, &g->syncpt_mem, | 329 | nr_pages = DIV_ROUND_UP(g->syncpt_unit_size, PAGE_SIZE); |
330 | g->syncpt_unit_base, nr_pages); | 330 | __nvgpu_mem_create_from_phys(g, &g->syncpt_mem, |
331 | g->syncpt_unit_base, nr_pages); | ||
332 | } | ||
331 | } | 333 | } |
332 | #endif | 334 | #endif |
333 | 335 | ||