diff options
author | Deepak Nibade <dnibade@nvidia.com> | 2017-04-04 04:17:07 -0400 |
---|---|---|
committer | mobile promotions <svcmobile_promotions@nvidia.com> | 2017-04-10 02:54:26 -0400 |
commit | db2ee5c127afc3c270b0a5c0e74660f0532dafbe (patch) | |
tree | ff6d7641197a4ab77799a1bd3bcf69de7ba94572 /drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |
parent | 3429657f9308b27e4721d88b1c1c307b23bfb316 (diff) |
gpu: nvgpu: use nvgpu list for buffer states
Use nvgpu list APIs instead of linux list APIs
for to store buffer states in gk20a_dmabuf_priv.
Jira NVGPU-13
Change-Id: I9666b2435804b132bb86bb74c0b20590749b153f
Signed-off-by: Deepak Nibade <dnibade@nvidia.com>
Reviewed-on: http://git-master/r/1454689
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: svccoveritychecker <svccoveritychecker@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r-- | drivers/gpu/nvgpu/gk20a/mm_gk20a.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h index 53366caf..f4bbec23 100644 --- a/drivers/gpu/nvgpu/gk20a/mm_gk20a.h +++ b/drivers/gpu/nvgpu/gk20a/mm_gk20a.h | |||
@@ -87,7 +87,7 @@ struct compbit_store_desc { | |||
87 | }; | 87 | }; |
88 | 88 | ||
89 | struct gk20a_buffer_state { | 89 | struct gk20a_buffer_state { |
90 | struct list_head list; | 90 | struct nvgpu_list_node list; |
91 | 91 | ||
92 | /* The valid compbits and the fence must be changed atomically. */ | 92 | /* The valid compbits and the fence must be changed atomically. */ |
93 | struct nvgpu_mutex lock; | 93 | struct nvgpu_mutex lock; |
@@ -108,6 +108,13 @@ struct gk20a_buffer_state { | |||
108 | struct gk20a_fence *fence; | 108 | struct gk20a_fence *fence; |
109 | }; | 109 | }; |
110 | 110 | ||
111 | static inline struct gk20a_buffer_state * | ||
112 | gk20a_buffer_state_from_list(struct nvgpu_list_node *node) | ||
113 | { | ||
114 | return (struct gk20a_buffer_state *) | ||
115 | ((uintptr_t)node - offsetof(struct gk20a_buffer_state, list)); | ||
116 | }; | ||
117 | |||
111 | enum gmmu_pgsz_gk20a { | 118 | enum gmmu_pgsz_gk20a { |
112 | gmmu_page_size_small = 0, | 119 | gmmu_page_size_small = 0, |
113 | gmmu_page_size_big = 1, | 120 | gmmu_page_size_big = 1, |