summaryrefslogtreecommitdiffstats
path: root/include/drm/drm_prime.h
diff options
context:
space:
mode:
authorLaura Abbott <labbott@redhat.com>2017-05-04 20:45:47 +0200
committerDaniel Vetter <daniel.vetter@ffwll.ch>2017-05-08 09:39:13 +0200
commit7e491583dfec02d0b24990e603b7c5ec894dccd9 (patch)
tree54056b15ad24bbdfb43efaeb315450d2cd2277af /include/drm/drm_prime.h
parentdrm/vgem: Add a dummy platform device (diff)
downloadlinux-7e491583dfec02d0b24990e603b7c5ec894dccd9.tar.xz
linux-7e491583dfec02d0b24990e603b7c5ec894dccd9.zip
drm/prime: Introduce drm_gem_prime_import_dev
The existing drm_gem_prime_import function uses the underlying struct device of a drm_device for attaching to a dma_buf. Some drivers (notably vgem) may not have an underlying device structure. Offer an alternate function to attach using any available device structure. Signed-off-by: Laura Abbott <labbott@redhat.com> Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/1493923548-20878-3-git-send-email-labbott@redhat.com
Diffstat (limited to 'include/drm/drm_prime.h')
-rw-r--r--include/drm/drm_prime.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_prime.h b/include/drm/drm_prime.h
index 0b2a235c4be0..46fd1fb4fb05 100644
--- a/include/drm/drm_prime.h
+++ b/include/drm/drm_prime.h
@@ -65,6 +65,11 @@ int drm_gem_prime_handle_to_fd(struct drm_device *dev,
int *prime_fd);
struct drm_gem_object *drm_gem_prime_import(struct drm_device *dev,
struct dma_buf *dma_buf);
+
+struct drm_gem_object *drm_gem_prime_import_dev(struct drm_device *dev,
+ struct dma_buf *dma_buf,
+ struct device *attach_dev);
+
int drm_gem_prime_fd_to_handle(struct drm_device *dev,
struct drm_file *file_priv, int prime_fd, uint32_t *handle);
struct dma_buf *drm_gem_dmabuf_export(struct drm_device *dev,