mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-08-21 08:19:28 +00:00
![Gerd Hoffmann](/assets/img/avatar_default.png)
A driver to let userspace turn memfd regions into dma-bufs. Use case: Allows qemu create dmabufs for the vga framebuffer or virtio-gpu ressources. Then they can be passed around to display those guest things on the host. To spice client for classic full framebuffer display, and hopefully some day to wayland server for seamless guest window display. qemu test branch: https://git.kraxel.org/cgit/qemu/log/?h=sirius/udmabuf Cc: David Airlie <airlied@linux.ie> Cc: Tomeu Vizoso <tomeu.vizoso@collabora.com> Cc: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Cc: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: http://patchwork.freedesktop.org/patch/msgid/20180827093444.23623-1-kraxel@redhat.com
33 lines
658 B
C
33 lines
658 B
C
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
#ifndef _UAPI_LINUX_UDMABUF_H
|
|
#define _UAPI_LINUX_UDMABUF_H
|
|
|
|
#include <linux/types.h>
|
|
#include <linux/ioctl.h>
|
|
|
|
#define UDMABUF_FLAGS_CLOEXEC 0x01
|
|
|
|
struct udmabuf_create {
|
|
__u32 memfd;
|
|
__u32 flags;
|
|
__u64 offset;
|
|
__u64 size;
|
|
};
|
|
|
|
struct udmabuf_create_item {
|
|
__u32 memfd;
|
|
__u32 __pad;
|
|
__u64 offset;
|
|
__u64 size;
|
|
};
|
|
|
|
struct udmabuf_create_list {
|
|
__u32 flags;
|
|
__u32 count;
|
|
struct udmabuf_create_item list[];
|
|
};
|
|
|
|
#define UDMABUF_CREATE _IOW('u', 0x42, struct udmabuf_create)
|
|
#define UDMABUF_CREATE_LIST _IOW('u', 0x43, struct udmabuf_create_list)
|
|
|
|
#endif /* _UAPI_LINUX_UDMABUF_H */
|