Re: [PATCH v13 5/7] vfio: ABI for mdev display dma-buf operation

Zhang, Tina
2017-07-31T00:31:32Z

> -----Original Message-----
> From: intel-gvt-dev [mailto:intel-gvt-dev-bounces@lists.freedesktop.org] On
> Behalf Of Gerd Hoffmann
> Sent: Friday, July 28, 2017 4:27 PM
> To: Zhang, Tina <tina.zhang@intel.com>; intel-gfx@lists.freedesktop.org; intel-
> gvt-dev@lists.freedesktop.org; dri-devel@lists.freedesktop.org;
> ville.syrjala@linux.intel.com; zhenyuw@linux.intel.com; Lv, Zhiyuan
> <zhiyuan.lv@intel.com>; Wang, Zhi A <zhi.a.wang@intel.com>;
> alex.williamson@redhat.com; chris@chris-wilson.co.uk; daniel@ffwll.ch;
> kwankhede@nvidia.com; Tian, Kevin <kevin.tian@intel.com>
> Subject: Re: [PATCH v13 5/7] vfio: ABI for mdev display dma-buf operation
>
> Hi,
>
> > +/**
> > + * VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14,
> > struct vfio_device_query_gfx_plane)
> > + *
> > + * Set the drm_plane_type and retrieve information about the gfx
> > plane.
> + *
> > + * Return: 0 on success, -errno on failure.
>
> I think this should be more verbose, especially documenting that the "guest
> driver didn't initialize the display yet" case isn't and error and fields should be set
> to zero then (as discussed on the list).
I can add this in the next version.
Thanks.

Tina
>
> > + */
> > +struct vfio_device_gfx_plane_info {
> > + __u32 argsz;
> > + __u32 flags;
> > + /* in */
> > + __u32 drm_plane_type; /* type of plane:
> > DRM_PLANE_TYPE_* */
> > + /* out */
> > + __u32 drm_format; /* drm format of plane */
> > + __u64 drm_format_mod;   /* tiled mode */
> > + __u32 width; /* width of plane */
> > + __u32 height; /* height of plane */
> > + __u32 stride; /* stride of plane */
> > + __u32 size; /* size of plane in bytes, align on
> > page*/
> > + __u32 x_pos; /* horizontal position of cursor plane,
> > upper left corner in pixels */
> > + __u32 y_pos; /* vertical position of cursor plane,
> > upper left corner in lines*/
> > + __u32 region_index;
> > + __s32 fd; /* dma-buf fd */
> > +};
>
> Looks good to me.
>
> Unfortunately I havn't been able to test the whole series yet due to being busy
> with other stuff, and I'm about to leave for my summer vacation. Will be back
> online on Aug 21st.
Fine to me. I will also update our qemu sample code and some wiki according to the current interface in the next version, which
may give you some help for your test.
Thanks.

Tina

>
> cheers,
> Gerd
>
>
> _______________________________________________
> intel-gvt-dev mailing list
> intel-gvt-dev@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gvt-dev