[PATCH 07/12] drm: export drm_gem_prime_dmabuf_ops
Felix Kuehling
Felix.Kuehling at amd.com
Mon Jul 3 21:11:29 UTC 2017
From: Christian König <christian.koenig at amd.com>
This allows drivers to check if a DMA-buf contains a GEM object or not.
Signed-off-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Felix Kuehling <Felix.Kuehling at amd.com>
---
drivers/gpu/drm/drm_prime.c | 3 ++-
include/drm/drmP.h | 2 ++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/drm_prime.c b/drivers/gpu/drm/drm_prime.c
index 25aa455..5cb4fd9 100644
--- a/drivers/gpu/drm/drm_prime.c
+++ b/drivers/gpu/drm/drm_prime.c
@@ -396,7 +396,7 @@ static int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf,
return dev->driver->gem_prime_mmap(obj, vma);
}
-static const struct dma_buf_ops drm_gem_prime_dmabuf_ops = {
+const struct dma_buf_ops drm_gem_prime_dmabuf_ops = {
.attach = drm_gem_map_attach,
.detach = drm_gem_map_detach,
.map_dma_buf = drm_gem_map_dma_buf,
@@ -410,6 +410,7 @@ static int drm_gem_dmabuf_mmap(struct dma_buf *dma_buf,
.vmap = drm_gem_dmabuf_vmap,
.vunmap = drm_gem_dmabuf_vunmap,
};
+EXPORT_SYMBOL(drm_gem_prime_dmabuf_ops);
/**
* DOC: PRIME Helpers
diff --git a/include/drm/drmP.h b/include/drm/drmP.h
index 6105c05..e0ea8f8 100644
--- a/include/drm/drmP.h
+++ b/include/drm/drmP.h
@@ -761,6 +761,8 @@ static inline int drm_debugfs_remove_files(const struct drm_info_list *files,
struct dma_buf_export_info;
+extern const struct dma_buf_ops drm_gem_prime_dmabuf_ops;
+
extern struct dma_buf *drm_gem_prime_export(struct drm_device *dev,
struct drm_gem_object *obj,
int flags);
--
1.9.1
More information about the amd-gfx
mailing list