aboutsummaryrefslogtreecommitdiff
path: root/include/drm
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2013-06-11 08:14:21 +1000
committerDave Airlie <airlied@redhat.com>2013-06-11 08:14:21 +1000
commitedee06b6f6b55c81c4cb78d0776d8ca01b05380d (patch)
treeb2ed77452d8375d53a57012c0ff16affb7aef717 /include/drm
parentd20d3174806ef6589cb912a488657d21fcd7ece2 (diff)
parent71d7282a0f1abb488e5be4d154893579624bc683 (diff)
Merge branch 'drm/next' of git://linuxtv.org/pinchartl/fbdev into drm-next
GEM CMA PRIME support from Laurent. * 'drm/next' of git://linuxtv.org/pinchartl/fbdev: drm: GEM CMA: Add DRM PRIME support drm: GEM CMA: Split object mapping into GEM mapping and CMA mapping drm: GEM CMA: Split object creation into object alloc and DMA memory alloc drm/omap: Use drm_gem_mmap_obj() to implement dma-buf mmap drm/gem: Split drm_gem_mmap() into object search and object mapping
Diffstat (limited to 'include/drm')
-rw-r--r--include/drm/drmP.h2
-rw-r--r--include/drm/drm_gem_cma_helper.h9
2 files changed, 11 insertions, 0 deletions
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index e4f765c80fb..82670ac0d77 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -1616,6 +1616,8 @@ int drm_gem_private_object_init(struct drm_device *dev,
void drm_gem_object_handle_free(struct drm_gem_object *obj);
void drm_gem_vm_open(struct vm_area_struct *vma);
void drm_gem_vm_close(struct vm_area_struct *vma);
+int drm_gem_mmap_obj(struct drm_gem_object *obj, unsigned long obj_size,
+ struct vm_area_struct *vma);
int drm_gem_mmap(struct file *filp, struct vm_area_struct *vma);
#include <drm/drm_global.h>
diff --git a/include/drm/drm_gem_cma_helper.h b/include/drm/drm_gem_cma_helper.h
index 63397ced925..6e17251e9b2 100644
--- a/include/drm/drm_gem_cma_helper.h
+++ b/include/drm/drm_gem_cma_helper.h
@@ -4,6 +4,9 @@
struct drm_gem_cma_object {
struct drm_gem_object base;
dma_addr_t paddr;
+ struct sg_table *sgt;
+
+ /* For objects with DMA memory allocated by GEM CMA */
void *vaddr;
};
@@ -45,4 +48,10 @@ extern const struct vm_operations_struct drm_gem_cma_vm_ops;
void drm_gem_cma_describe(struct drm_gem_cma_object *obj, struct seq_file *m);
#endif
+struct dma_buf *drm_gem_cma_dmabuf_export(struct drm_device *drm_dev,
+ struct drm_gem_object *obj,
+ int flags);
+struct drm_gem_object *drm_gem_cma_dmabuf_import(struct drm_device *drm_dev,
+ struct dma_buf *dma_buf);
+
#endif /* __DRM_GEM_CMA_HELPER_H__ */