drm: GEM CMA: Add DRM PRIME support

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Reviewed-by: Rob Clark <robdclark@gmail.com>
This commit is contained in:
Laurent Pinchart
2013-02-17 01:57:30 +01:00
parent ebaf9e033e
commit 71d7282a0f
2 changed files with 323 additions and 3 deletions

View File

@@ -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__ */