diff options
Diffstat (limited to 'include/drm/drm_prime.h')
-rw-r--r-- | include/drm/drm_prime.h | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h index 9cd9e36f77b5..4d5f5d6cf6a6 100644 --- a/include/drm/drm_prime.h +++ b/include/drm/drm_prime.h | |||
@@ -54,6 +54,9 @@ struct device; | |||
54 | 54 | ||
55 | struct dma_buf_export_info; | 55 | struct dma_buf_export_info; |
56 | struct dma_buf; | 56 | struct dma_buf; |
57 | struct dma_buf_attachment; | ||
58 | |||
59 | enum dma_data_direction; | ||
57 | 60 | ||
58 | struct drm_device; | 61 | struct drm_device; |
59 | struct drm_gem_object; | 62 | struct drm_gem_object; |
@@ -79,6 +82,25 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev, | |||
79 | struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev, | 82 | struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev, |
80 | struct dma_buf_export_info *exp_info); | 83 | struct dma_buf_export_info *exp_info); |
81 | void drm_gem_dmabuf_release(struct dma_buf *dma_buf); | 84 | void drm_gem_dmabuf_release(struct dma_buf *dma_buf); |
85 | int drm_gem_map_attach(struct dma_buf *dma_buf, struct device *target_dev, | ||
86 | struct dma_buf_attachment *attach); | ||
87 | void drm_gem_map_detach(struct dma_buf *dma_buf, | ||
88 | struct dma_buf_attachment *attach); | ||
89 | struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach, | ||
90 | enum dma_data_direction dir); | ||
91 | void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach, | ||
92 | struct sg_table *sgt, | ||
93 | enum dma_data_direction dir); | ||
94 | void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf); | ||
95 | void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr); | ||
96 | void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf, | ||
97 | unsigned long page_num); | ||
98 | void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf, | ||
99 | unsigned long page_num, void *addr); | ||
100 | void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num); | ||
101 | void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num, | ||
102 | void *addr); | ||
103 | int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma); | ||
82 | 104 | ||
83 | int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages, | 105 | int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages, |
84 | dma_addr_t *addrs, int max_pages); | 106 | dma_addr_t *addrs, int max_pages); |