diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-05-09 21:34:54 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-06-06 20:09:16 -0400 |
commit | c21f5bca9ae81804130e30ea3e6f7a18d51203dc (patch) | |
tree | fb1a2d67532df19d70468610ad2a62c3464876c1 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | c2b63150cd947557b8d17637258b988459b8e0ec (diff) |
gpu: nvgpu: Remove extraneous VM init/deinit APIs
Support only VM pointers and ref-counting for maintaining VMs. This
dramatically reduces the complexity of the APIs, avoids the API
abuse that has existed, and ensures that future VM usage is
consistent with current usage.
Also remove the combined VM free/instance block deletion. Any place
where this was done is now replaced with an explict free of the
instance block and a nvgpu_vm_put().
JIRA NVGPU-12
JIRA NVGPU-30
Change-Id: Ib73e8d574ecc9abf6dad0b40a2c5795d6396cc8c
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1480227
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 16c35d34..7e2ba051 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -78,8 +78,6 @@ struct pm_ctx_desc { | |||
78 | u32 pm_mode; | 78 | u32 pm_mode; |
79 | }; | 79 | }; |
80 | 80 | ||
81 | struct gk20a; | ||
82 | |||
83 | struct compbit_store_desc { | 81 | struct compbit_store_desc { |
84 | struct nvgpu_mem mem; | 82 | struct nvgpu_mem mem; |
85 | 83 | ||
@@ -191,19 +189,19 @@ struct mm_gk20a { | |||
191 | 189 | ||
192 | struct { | 190 | struct { |
193 | u32 aperture_size; | 191 | u32 aperture_size; |
194 | struct vm_gk20a vm; | 192 | struct vm_gk20a *vm; |
195 | struct nvgpu_mem inst_block; | 193 | struct nvgpu_mem inst_block; |
196 | } bar1; | 194 | } bar1; |
197 | 195 | ||
198 | struct { | 196 | struct { |
199 | u32 aperture_size; | 197 | u32 aperture_size; |
200 | struct vm_gk20a vm; | 198 | struct vm_gk20a *vm; |
201 | struct nvgpu_mem inst_block; | 199 | struct nvgpu_mem inst_block; |
202 | } bar2; | 200 | } bar2; |
203 | 201 | ||
204 | struct { | 202 | struct { |
205 | u32 aperture_size; | 203 | u32 aperture_size; |
206 | struct vm_gk20a vm; | 204 | struct vm_gk20a *vm; |
207 | struct nvgpu_mem inst_block; | 205 | struct nvgpu_mem inst_block; |
208 | } pmu; | 206 | } pmu; |
209 | 207 | ||
@@ -213,16 +211,16 @@ struct mm_gk20a { | |||
213 | } hwpm; | 211 | } hwpm; |
214 | 212 | ||
215 | struct { | 213 | struct { |
216 | struct vm_gk20a vm; | 214 | struct vm_gk20a *vm; |
217 | struct nvgpu_mem inst_block; | 215 | struct nvgpu_mem inst_block; |
218 | } perfbuf; | 216 | } perfbuf; |
219 | 217 | ||
220 | struct { | 218 | struct { |
221 | struct vm_gk20a vm; | 219 | struct vm_gk20a *vm; |
222 | } cde; | 220 | } cde; |
223 | 221 | ||
224 | struct { | 222 | struct { |
225 | struct vm_gk20a vm; | 223 | struct vm_gk20a *vm; |
226 | } ce; | 224 | } ce; |
227 | 225 | ||
228 | struct nvgpu_mutex l2_op_lock; | 226 | struct nvgpu_mutex l2_op_lock; |