summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/nvgpu/gk20a/mm_gk20a.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/nvgpu/gk20a/mm_gk20a.h')
-rw-r--r--drivers/gpu/nvgpu/gk20a/mm_gk20a.h9
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
89struct gk20a_buffer_state { 89struct 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
111static inline struct gk20a_buffer_state *
112gk20a_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
111enum gmmu_pgsz_gk20a { 118enum 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,