diff options
author | Richard Zhao <rizhao@nvidia.com> | 2018-04-11 14:23:02 -0400 |
---|---|---|
committer | Tejal Kudav <tkudav@nvidia.com> | 2018-06-14 09:44:06 -0400 |
commit | 7aa928fa07066b1b9ac6ffb2edf0b473f10a2518 (patch) | |
tree | 9c6b6920d7a0032f7e2074fa16a9a23eaca57aba /drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | |
parent | d4ede4b59f1049bca502fa8a270c3b3ff95ea26e (diff) |
gpu: nvgpu: vgpu: implement .free_syncpt_buf
vgpu needs to free the va range besides unmap the syncpt buffer.
Jira VFND-4870
Change-Id: Ia9edb687b66db6da8529bf256d348999e24a0bc3
Signed-off-by: Richard Zhao <rizhao@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1693094
Reviewed-by: Automatic_Commit_Validation_User
GVS: Gerrit_Virtual_Submit
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c')
-rw-r--r-- | drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c index 9b689699..e718a30d 100644 --- a/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c +++ b/drivers/gpu/nvgpu/vgpu/gv11b/vgpu_fifo_gv11b.c | |||
@@ -21,6 +21,7 @@ | |||
21 | */ | 21 | */ |
22 | 22 | ||
23 | #include <gk20a/gk20a.h> | 23 | #include <gk20a/gk20a.h> |
24 | #include <nvgpu/dma.h> | ||
24 | #include <nvgpu/vgpu/vgpu.h> | 25 | #include <nvgpu/vgpu/vgpu.h> |
25 | #include <nvgpu/nvhost.h> | 26 | #include <nvgpu/nvhost.h> |
26 | #include <nvgpu/vgpu/tegra_vgpu.h> | 27 | #include <nvgpu/vgpu/tegra_vgpu.h> |
@@ -116,6 +117,14 @@ int vgpu_gv11b_fifo_alloc_syncpt_buf(struct channel_gk20a *c, | |||
116 | return 0; | 117 | return 0; |
117 | } | 118 | } |
118 | 119 | ||
120 | void vgpu_gv11b_fifo_free_syncpt_buf(struct channel_gk20a *c, | ||
121 | struct nvgpu_mem *syncpt_buf) | ||
122 | { | ||
123 | nvgpu_gmmu_unmap(c->vm, syncpt_buf, syncpt_buf->gpu_va); | ||
124 | __nvgpu_vm_free_va(c->vm, syncpt_buf->gpu_va, gmmu_page_size_kernel); | ||
125 | nvgpu_dma_free(c->g, syncpt_buf); | ||
126 | } | ||
127 | |||
119 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, | 128 | int vgpu_gv11b_fifo_get_sync_ro_map(struct vm_gk20a *vm, |
120 | u64 *base_gpuva, u32 *sync_size) | 129 | u64 *base_gpuva, u32 *sync_size) |
121 | { | 130 | { |