Re: [PATCH v6 4/6] vfio: Define vfio based vgpu's dma-buf operations

From: Gerd Hoffmann
Date: Mon May 29 2017 - 03:20:40 EST


> +struct vfio_vgpu_dmabuf_info {
> + __u32 argsz;
> + __u32 flags;
> + struct vfio_vgpu_plane_info plane_info;
> + __s32 fd;
> + __u32 pad;
> +};

Hmm, now you have argsz and flags twice in vfio_vgpu_dmabuf_info ...

I think we should have something like this:

struct vfio_vgpu_plane_info {
ÂÂÂÂÂ ÂÂ__u64 start;
ÂÂÂÂÂ ÂÂ__u64 drm_format_mod;
ÂÂÂÂÂ ÂÂ__u32 drm_format;
ÂÂÂÂÂ ÂÂ__u32 width;
ÂÂÂÂÂ ÂÂ__u32 height;
ÂÂÂÂÂÂ Â__u32 stride;
ÂÂÂÂÂ ÂÂ__u32 size;
ÂÂÂÂÂÂÂ __u32 x_pos;
ÂÂÂÂÂÂÂ __u32 y_pos;
__u32 padding;
};

struct vfio_vgpu_query_plane {
__u32 argsz;
__u32 flags;
struct vfio_vgpu_plane_info plane_info;
__u32 plane_id;
__u32 padding;
};

struct vfio_vgpu_create_dmabuf {
__u32 argsz;
__u32 flags;
struct vfio_vgpu_plane_info plane_info;
__u32 plane_id;
__s32 fd;
};