diff options
Diffstat (limited to 'drivers/gpu/nvgpu/include')
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/comptags.h | 12 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | 6 | ||||
-rw-r--r-- | drivers/gpu/nvgpu/include/nvgpu/vm.h | 6 |
3 files changed, 24 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/include/nvgpu/comptags.h b/drivers/gpu/nvgpu/include/nvgpu/comptags.h index 6e3062ec..5482d0ce 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/comptags.h +++ b/drivers/gpu/nvgpu/include/nvgpu/comptags.h | |||
@@ -20,6 +20,7 @@ | |||
20 | #include <nvgpu/lock.h> | 20 | #include <nvgpu/lock.h> |
21 | 21 | ||
22 | struct gk20a; | 22 | struct gk20a; |
23 | struct nvgpu_os_buffer; | ||
23 | 24 | ||
24 | struct gk20a_comptags { | 25 | struct gk20a_comptags { |
25 | u32 offset; | 26 | u32 offset; |
@@ -52,6 +53,17 @@ int gk20a_comptaglines_alloc(struct gk20a_comptag_allocator *allocator, | |||
52 | void gk20a_comptaglines_free(struct gk20a_comptag_allocator *allocator, | 53 | void gk20a_comptaglines_free(struct gk20a_comptag_allocator *allocator, |
53 | u32 offset, u32 len); | 54 | u32 offset, u32 len); |
54 | 55 | ||
56 | /* | ||
57 | * Defined by OS specific code since comptags are stored in a highly OS specific | ||
58 | * way. | ||
59 | */ | ||
60 | int gk20a_alloc_comptags(struct gk20a *g, | ||
61 | struct nvgpu_os_buffer *buf, | ||
62 | struct gk20a_comptag_allocator *allocator, | ||
63 | u32 lines); | ||
64 | void gk20a_get_comptags(struct nvgpu_os_buffer *buf, | ||
65 | struct gk20a_comptags *comptags); | ||
66 | |||
55 | 67 | ||
56 | 68 | ||
57 | #endif | 69 | #endif |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h index dee8fa09..39deeb69 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/linux/vm.h | |||
@@ -33,11 +33,17 @@ | |||
33 | 33 | ||
34 | struct sg_table; | 34 | struct sg_table; |
35 | struct dma_buf; | 35 | struct dma_buf; |
36 | struct device; | ||
36 | 37 | ||
37 | struct vm_gk20a; | 38 | struct vm_gk20a; |
38 | struct vm_gk20a_mapping_batch; | 39 | struct vm_gk20a_mapping_batch; |
39 | struct nvgpu_vm_area; | 40 | struct nvgpu_vm_area; |
40 | 41 | ||
42 | struct nvgpu_os_buffer { | ||
43 | struct dma_buf *dmabuf; | ||
44 | struct device *dev; | ||
45 | }; | ||
46 | |||
41 | /* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ | 47 | /* NVGPU_AS_MAP_BUFFER_FLAGS_DIRECT_KIND_CTRL must be set */ |
42 | int nvgpu_vm_map_linux(struct vm_gk20a *vm, | 48 | int nvgpu_vm_map_linux(struct vm_gk20a *vm, |
43 | struct dma_buf *dmabuf, | 49 | struct dma_buf *dmabuf, |
diff --git a/drivers/gpu/nvgpu/include/nvgpu/vm.h b/drivers/gpu/nvgpu/include/nvgpu/vm.h index 10a7f7ce..b91b41e4 100644 --- a/drivers/gpu/nvgpu/include/nvgpu/vm.h +++ b/drivers/gpu/nvgpu/include/nvgpu/vm.h | |||
@@ -107,6 +107,12 @@ struct nvgpu_mapped_buf { | |||
107 | bool va_allocated; | 107 | bool va_allocated; |
108 | }; | 108 | }; |
109 | 109 | ||
110 | /* | ||
111 | * Defined by each OS. Allows the common VM code do things to the OS specific | ||
112 | * buffer structures. | ||
113 | */ | ||
114 | struct nvgpu_os_buffer; | ||
115 | |||
110 | static inline struct nvgpu_mapped_buf * | 116 | static inline struct nvgpu_mapped_buf * |
111 | nvgpu_mapped_buf_from_buffer_list(struct nvgpu_list_node *node) | 117 | nvgpu_mapped_buf_from_buffer_list(struct nvgpu_list_node *node) |
112 | { | 118 | { |