aboutsummaryrefslogtreecommitdiffstats
path: root/include/drm/drm_prime.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/drm/drm_prime.h')
-rw-r--r--include/drm/drm_prime.h22
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
55struct dma_buf_export_info; 55struct dma_buf_export_info;
56struct dma_buf; 56struct dma_buf;
57struct dma_buf_attachment;
58
59enum dma_data_direction;
57 60
58struct drm_device; 61struct drm_device;
59struct drm_gem_object; 62struct drm_gem_object;
@@ -79,6 +82,25 @@ int drm_gem_prime_fd_to_handle(struct drm_device *dev,
79struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev, 82struct 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);
81void drm_gem_dmabuf_release(struct dma_buf *dma_buf); 84void drm_gem_dmabuf_release(struct dma_buf *dma_buf);
85int drm_gem_map_attach(struct dma_buf *dma_buf, struct device *target_dev,
86 struct dma_buf_attachment *attach);
87void drm_gem_map_detach(struct dma_buf *dma_buf,
88 struct dma_buf_attachment *attach);
89struct sg_table *drm_gem_map_dma_buf(struct dma_buf_attachment *attach,
90 enum dma_data_direction dir);
91void drm_gem_unmap_dma_buf(struct dma_buf_attachment *attach,
92 struct sg_table *sgt,
93 enum dma_data_direction dir);
94void *drm_gem_dmabuf_vmap(struct dma_buf *dma_buf);
95void drm_gem_dmabuf_vunmap(struct dma_buf *dma_buf, void *vaddr);
96void *drm_gem_dmabuf_kmap_atomic(struct dma_buf *dma_buf,
97 unsigned long page_num);
98void drm_gem_dmabuf_kunmap_atomic(struct dma_buf *dma_buf,
99 unsigned long page_num, void *addr);
100void *drm_gem_dmabuf_kmap(struct dma_buf *dma_buf, unsigned long page_num);
101void drm_gem_dmabuf_kunmap(struct dma_buf *dma_buf, unsigned long page_num,
102 void *addr);
103int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf, struct vm_area_struct *vma);
82 104
83int drm_prime_sg_to_page_addr_arrays(struct sg_table *sgt, struct page **pages, 105int 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);