diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | 10 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vidmem.h | 21 |
2 files changed, 23 insertions, 8 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h index 537409a8..6feacff7 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/nvgpu_mem.h | |||
@@ -273,6 +273,16 @@ int nvgpu_mem_create_from_mem(struct gk20a *g, | |||
273 | int start_page, int nr_pages); | 273 | int start_page, int nr_pages); |
274 | 274 | ||
275 | /* | 275 | /* |
276 | * Really free a vidmem buffer. There's a fair amount of work involved in | ||
277 | * freeing vidmem buffers in the DMA API. This handles none of that - it only | ||
278 | * frees the underlying vidmem specific structures used in vidmem buffers. | ||
279 | * | ||
280 | * This is implemented in the OS specific code. If it's not necessary it can | ||
281 | * be a noop. But the symbol must at least be present. | ||
282 | */ | ||
283 | void __nvgpu_mem_free_vidmem_alloc(struct gk20a *g, struct nvgpu_mem *vidmem); | ||
284 | |||
285 | /* | ||
276 | * Buffer accessors - wrap between begin() and end() if there is no permanent | 286 | * Buffer accessors - wrap between begin() and end() if there is no permanent |
277 | * kernel mapping for this buffer. | 287 | * kernel mapping for this buffer. |
278 | */ | 288 | */ |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h index 9e9f8301..690f8164 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vidmem.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vidmem.h | |||
@@ -73,17 +73,19 @@ struct nvgpu_vidmem_buf *nvgpu_vidmem_user_alloc(struct gk20a *g, size_t bytes); | |||
73 | 73 | ||
74 | void nvgpu_vidmem_buf_free(struct gk20a *g, struct nvgpu_vidmem_buf *buf); | 74 | void nvgpu_vidmem_buf_free(struct gk20a *g, struct nvgpu_vidmem_buf *buf); |
75 | 75 | ||
76 | int nvgpu_vidmem_clear_list_enqueue(struct gk20a *g, struct nvgpu_mem *mem); | ||
77 | |||
76 | bool nvgpu_addr_is_vidmem_page_alloc(u64 addr); | 78 | bool nvgpu_addr_is_vidmem_page_alloc(u64 addr); |
77 | int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space); | 79 | int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space); |
78 | 80 | ||
79 | struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm); | ||
80 | |||
81 | void nvgpu_vidmem_destroy(struct gk20a *g); | 81 | void nvgpu_vidmem_destroy(struct gk20a *g); |
82 | int nvgpu_vidmem_init(struct mm_gk20a *mm); | 82 | int nvgpu_vidmem_init(struct mm_gk20a *mm); |
83 | 83 | ||
84 | void nvgpu_vidmem_clear_mem_worker(struct work_struct *work); | ||
85 | int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem); | 84 | int nvgpu_vidmem_clear(struct gk20a *g, struct nvgpu_mem *mem); |
86 | 85 | ||
86 | void nvgpu_vidmem_thread_pause_sync(struct mm_gk20a *mm); | ||
87 | void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm); | ||
88 | |||
87 | #else /* !defined(CONFIG_GK20A_VIDMEM) */ | 89 | #else /* !defined(CONFIG_GK20A_VIDMEM) */ |
88 | 90 | ||
89 | /* | 91 | /* |
@@ -110,11 +112,6 @@ static inline int nvgpu_vidmem_get_space(struct gk20a *g, u64 *space) | |||
110 | return -ENOSYS; | 112 | return -ENOSYS; |
111 | } | 113 | } |
112 | 114 | ||
113 | static inline struct nvgpu_mem *nvgpu_vidmem_get_pending_alloc(struct mm_gk20a *mm) | ||
114 | { | ||
115 | return NULL; | ||
116 | } | ||
117 | |||
118 | static inline void nvgpu_vidmem_destroy(struct gk20a *g) | 115 | static inline void nvgpu_vidmem_destroy(struct gk20a *g) |
119 | { | 116 | { |
120 | } | 117 | } |
@@ -135,6 +132,14 @@ static inline int nvgpu_vidmem_clear(struct gk20a *g, | |||
135 | return -ENOSYS; | 132 | return -ENOSYS; |
136 | } | 133 | } |
137 | 134 | ||
135 | static inline void nvgpu_vidmem_thread_pause_sync(struct mm_gk20a *mm) | ||
136 | { | ||
137 | } | ||
138 | |||
139 | static inline void nvgpu_vidmem_thread_unpause(struct mm_gk20a *mm) | ||
140 | { | ||
141 | } | ||
142 | |||
138 | #endif /* !defined(CONFIG_GK20A_VIDMEM) */ | 143 | #endif /* !defined(CONFIG_GK20A_VIDMEM) */ |
139 | 144 | ||
140 | #endif /* __NVGPU_VIDMEM_H__ */ | 145 | #endif /* __NVGPU_VIDMEM_H__ */ |