diff options
author | Alex Waterman <alexw@nvidia.com> | 2017-03-08 20:08:50 -0500 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-03-30 15:36:09 -0400 |
commit | 24e1c7e0a729158be36d63b821550d206a8a0436 (patch) | |
tree | cf26c850cc63957f63f3e8f97914268839d8e0de /drivers/gpu/nvgpu/gk20a/fence_gk20a.h | |
parent | 7010bf88399ea81b2b35844f738baac19dc5a441 (diff) |
gpu: nvgpu: Use new kmem API functions (misc)
Use the new kmem API functions in misc gk20a code. Some additional
modifications were also made:
o Add a struct gk20a pointer to gk20a_fence to enable proper
kmem free usage.
o Add gk20a pointer to alloc_session() in dbg_gpu_gk20a.c to
use kmem API for allocating a session.
o Plumb a gk20a pointer through the fence creation and deletion.
o Use statically allocated buffers for names in file creation.
Bug 1799159
Bug 1823380
Change-Id: I3678080e3ffa1f9bcf6934e3f4819a1bc531689b
Signed-off-by: Alex Waterman <alexw@nvidia.com>
Reviewed-on: http://git-master/r/1318323
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/fence_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/fence_gk20a.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h index b4283f58..9d9fde85 100644 --- a/drivers/gpu/nvgpu/gk20a/fence_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/fence_gk20a.h | |||
@@ -30,6 +30,8 @@ struct channel_gk20a; | |||
30 | struct gk20a_fence_ops; | 30 | struct gk20a_fence_ops; |
31 | 31 | ||
32 | struct gk20a_fence { | 32 | struct gk20a_fence { |
33 | struct gk20a *g; | ||
34 | |||
33 | /* Valid for all fence types: */ | 35 | /* Valid for all fence types: */ |
34 | bool valid; | 36 | bool valid; |
35 | struct kref ref; | 37 | struct kref ref; |
@@ -52,6 +54,7 @@ struct gk20a_fence { | |||
52 | 54 | ||
53 | /* Fences can be created from semaphores or syncpoint (id, value) pairs */ | 55 | /* Fences can be created from semaphores or syncpoint (id, value) pairs */ |
54 | int gk20a_fence_from_semaphore( | 56 | int gk20a_fence_from_semaphore( |
57 | struct gk20a *g, | ||
55 | struct gk20a_fence *fence_out, | 58 | struct gk20a_fence *fence_out, |
56 | struct sync_timeline *timeline, | 59 | struct sync_timeline *timeline, |
57 | struct nvgpu_semaphore *semaphore, | 60 | struct nvgpu_semaphore *semaphore, |