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
This commit is contained in:

committed by
Daniel Vetter

parent
e2aff44868
commit
7e491583df
@@ -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,
|
||||
|
Reference in New Issue
Block a user