diff options
author | Debarshi Dutta <ddutta@nvidia.com> | 2017-08-08 02:38:03 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-08-24 04:10:37 -0400 |
commit | 3fa47b877db1edc16018d662e7b9915d92354745 (patch) | |
tree | c1d9a8734e7d92b5ae647fbc3f582a01207a23f6 /drivers/gpu/nvgpu/include/nvgpu/vm.h | |
parent | 8662fae334f2419da2e7fd220f7734217ec52433 (diff) |
gpu: nvgpu: Replace kref for refcounting in nvgpu
- added wrapper struct nvgpu_ref over nvgpu_atomic_t
- added nvgpu_ref_* APIs to access the above struct
JIRA NVGPU-140
Change-Id: Id47f897995dd4721751f7610b6d4d4fbfe4d6b9a
Signed-off-by: Debarshi Dutta <ddutta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/1540899
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Konsta Holtta <kholtta@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/include/nvgpu/vm.h')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vm.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h index 255b4361..b5c64c99 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h | |||
@@ -88,7 +88,7 @@ struct nvgpu_mapped_buf { | |||
88 | u64 size; | 88 | u64 size; |
89 | struct dma_buf *dmabuf; | 89 | struct dma_buf *dmabuf; |
90 | struct sg_table *sgt; | 90 | struct sg_table *sgt; |
91 | struct kref ref; | 91 | struct nvgpu_ref ref; |
92 | u32 user_mapped; | 92 | u32 user_mapped; |
93 | bool own_mem_ref; | 93 | bool own_mem_ref; |
94 | u32 pgsz_idx; | 94 | u32 pgsz_idx; |
@@ -142,7 +142,7 @@ struct vm_gk20a { | |||
142 | 142 | ||
143 | const struct gk20a_mmu_level *mmu_levels; | 143 | const struct gk20a_mmu_level *mmu_levels; |
144 | 144 | ||
145 | struct kref ref; | 145 | struct nvgpu_ref ref; |
146 | 146 | ||
147 | struct nvgpu_mutex update_gmmu_lock; | 147 | struct nvgpu_mutex update_gmmu_lock; |
148 | 148 | ||