mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
FROMLIST: dma-buf: add support for virtio exported objects
This change adds a new dma-buf operation that allows dma-bufs to be used by virtio drivers to share exported objects. The new operation allows the importing driver to query the exporting driver for the UUID which identifies the underlying exported object. Signed-off-by: David Stevens <[email protected]> BUG=b:136269340 TEST=boot ARCVM and launch play store Signed-off-by: Keiichi Watanabe <[email protected]> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/2059086 Reviewed-by: Sean Paul <[email protected]> Reviewed-by: Gurchetan Singh <[email protected]> Tested-by: David Stevens <[email protected]> Commit-Queue: David Stevens <[email protected]> Bug: 153580313 Link: https://lore.kernel.org/lkml/[email protected]/ Change-Id: Ifb429e36ebbba9feead6fd1792fbefa9ca097f0c Signed-off-by: Lingfeng Yang <[email protected]>
This commit is contained in:
parent
6de64a2dca
commit
33bff2dd91
2 changed files with 27 additions and 0 deletions
|
|
@ -1203,6 +1203,18 @@ int dma_buf_get_flags(struct dma_buf *dmabuf, unsigned long *flags)
|
|||
}
|
||||
EXPORT_SYMBOL_GPL(dma_buf_get_flags);
|
||||
|
||||
int dma_buf_get_uuid(struct dma_buf *dmabuf, uuid_t *uuid)
|
||||
{
|
||||
if (WARN_ON(!dmabuf) || !uuid)
|
||||
return -EINVAL;
|
||||
|
||||
if (!dmabuf->ops->get_uuid)
|
||||
return -ENODEV;
|
||||
|
||||
return dmabuf->ops->get_uuid(dmabuf, uuid);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(dma_buf_get_uuid);
|
||||
|
||||
#ifdef CONFIG_DEBUG_FS
|
||||
static int dma_buf_debug_show(struct seq_file *s, void *unused)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue