[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <1495548597.30747.8.camel@redhat.com>
Date: Tue, 23 May 2017 16:09:57 +0200
From: Gerd Hoffmann <kraxel@...hat.com>
To: Xiaoguang Chen <xiaoguang.chen@...el.com>,
alex.williamson@...hat.com, intel-gfx@...ts.freedesktop.org,
linux-kernel@...r.kernel.org, zhenyuw@...ux.intel.com,
zhiyuan.lv@...el.com, intel-gvt-dev@...ts.freedesktop.org,
zhi.a.wang@...el.com, kevin.tian@...el.com
Subject: Re: [PATCH v5 5/5] drm/i915/gvt: Adding interface so user space can
get the dma-buf
Hi,
> diff --git a/include/uapi/linux/vfio.h b/include/uapi/linux/vfio.h
> index ae46105..285dc16 100644
> --- a/include/uapi/linux/vfio.h
> +++ b/include/uapi/linux/vfio.h
> @@ -502,10 +502,58 @@ struct vfio_pci_hot_reset {
>
> #define VFIO_DEVICE_PCI_HOT_RESET _IO(VFIO_TYPE, VFIO_BASE +
> 13)
>
> +/**
> + * VFIO_DEVICE_GET_FD - _IO(VFIO_TYPE, VFIO_BASE + 14, __u32)
> + *
> + * Create a fd for a vfio device based on the input type
> + * Vendor driver should handle this ioctl to create a fd and manage
> the
> + * life cycle of this fd.
> + *
> + * Return: a fd if vendor support that type, -errno if not supported
> + */
> +
> +#define VFIO_DEVICE_GET_FD _IO(VFIO_TYPE, VFIO_BASE + 14)
> +
> +#define VFIO_DEVICE_DMABUF_MGR_FD 0 /* Supported fd types */
> +
> +/*
> + * VFIO_DEVICE_QUERY_PLANE - _IO(VFIO_TYPE, VFIO_BASE + 15, struct
> plane_info)
> + * Query plane information for a plane
> + */
> +struct plane_info {
That is a pretty generic name. vfio_vgpu_plane_info? Or
vfio_dmabuf_plane_info?
> + __u32 plane_id;
> + __u32 drm_format;
> + __u32 width;
> + __u32 height;
> + __u32 stride;
> + __u32 start;
> + __u32 x_pos;
> + __u32 y_pos;
> + __u32 size;
> + __u64 drm_format_mod;
> +};
> +
> +#define VFIO_PRIMARY_PLANE 1
> +#define VFIO_CURSOR_PLANE 2
I think we should use "enum drm_plane_type" values instead of creating
something new.
cheers,
Gerd
Powered by blists - more mailing lists