diff options
Diffstat (limited to 'drivers/gpu/nvgpu/common/linux/vm_priv.h')
-rw-r--r-- | drivers/gpu/nvgpu/common/linux/vm_priv.h | 36 |
1 files changed, 34 insertions, 2 deletions
diff --git a/drivers/gpu/nvgpu/common/linux/vm_priv.h b/drivers/gpu/nvgpu/common/linux/vm_priv.h index c0fb0ffe..9e064d76 100644 --- a/drivers/gpu/nvgpu/common/linux/vm_priv.h +++ b/drivers/gpu/nvgpu/common/linux/vm_priv.h | |||
@@ -25,12 +25,24 @@ struct dma_buf; | |||
25 | struct vm_gk20a; | 25 | struct vm_gk20a; |
26 | struct vm_gk20a_mapping_batch; | 26 | struct vm_gk20a_mapping_batch; |
27 | 27 | ||
28 | struct buffer_attrs { | ||
29 | struct sg_table *sgt; | ||
30 | u64 size; | ||
31 | u64 align; | ||
32 | u32 ctag_offset; | ||
33 | u32 ctag_lines; | ||
34 | u32 ctag_allocated_lines; | ||
35 | int pgsz_idx; | ||
36 | u8 kind_v; | ||
37 | u8 uc_kind_v; | ||
38 | bool ctag_user_mappable; | ||
39 | }; | ||
40 | |||
28 | u64 nvgpu_vm_map(struct vm_gk20a *vm, | 41 | u64 nvgpu_vm_map(struct vm_gk20a *vm, |
29 | struct dma_buf *dmabuf, | 42 | struct dma_buf *dmabuf, |
30 | u64 offset_align, | 43 | u64 offset_align, |
31 | u32 flags /*NVGPU_AS_MAP_BUFFER_FLAGS_*/, | 44 | u32 flags, |
32 | int kind, | 45 | int kind, |
33 | struct sg_table **sgt, | ||
34 | bool user_mapped, | 46 | bool user_mapped, |
35 | int rw_flag, | 47 | int rw_flag, |
36 | u64 buffer_offset, | 48 | u64 buffer_offset, |
@@ -59,4 +71,24 @@ void nvgpu_vm_unmap(struct vm_gk20a *vm, u64 offset); | |||
59 | int nvgpu_vm_find_buffer(struct vm_gk20a *vm, u64 gpu_va, | 71 | int nvgpu_vm_find_buffer(struct vm_gk20a *vm, u64 gpu_va, |
60 | struct dma_buf **dmabuf, | 72 | struct dma_buf **dmabuf, |
61 | u64 *offset); | 73 | u64 *offset); |
74 | |||
75 | enum nvgpu_aperture gk20a_dmabuf_aperture(struct gk20a *g, | ||
76 | struct dma_buf *dmabuf); | ||
77 | int validate_fixed_buffer(struct vm_gk20a *vm, | ||
78 | struct buffer_attrs *bfr, | ||
79 | u64 map_offset, u64 map_size, | ||
80 | struct vm_reserved_va_node **pva_node); | ||
81 | int setup_buffer_kind_and_compression(struct vm_gk20a *vm, | ||
82 | u32 flags, | ||
83 | struct buffer_attrs *bfr, | ||
84 | enum gmmu_pgsz_gk20a pgsz_idx); | ||
85 | int gk20a_alloc_comptags(struct gk20a *g, | ||
86 | struct device *dev, | ||
87 | struct dma_buf *dmabuf, | ||
88 | struct gk20a_comptag_allocator *allocator, | ||
89 | u32 lines, bool user_mappable, | ||
90 | u64 *ctag_map_win_size, | ||
91 | u32 *ctag_map_win_ctagline); | ||
92 | void gk20a_vm_unmap_locked_kref(struct kref *ref); | ||
93 | |||
62 | #endif | 94 | #endif |