Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Kirti Wankhede
On 7/19/2017 11:55 AM, Gerd Hoffmann wrote: > On Wed, 2017-07-19 at 00:16 +, Zhang, Tina wrote: >>> -Original Message- >>> From: Gerd Hoffmann [mailto:kra...@redhat.com] >>> Sent: Monday, July 17, 2017 7:03 PM >>> To: Kirti Wankhede ; Zhang, Tina >>>

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-19 Thread Gerd Hoffmann
On Wed, 2017-07-19 at 00:16 +, Zhang, Tina wrote: > > -Original Message- > > From: Gerd Hoffmann [mailto:kra...@redhat.com] > > Sent: Monday, July 17, 2017 7:03 PM > > To: Kirti Wankhede ; Zhang, Tina > > ; Tian, Kevin ;

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-18 Thread Zhang, Tina
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Monday, July 17, 2017 7:03 PM > To: Kirti Wankhede ; Zhang, Tina > ; Tian, Kevin ; linux- > ker...@vger.kernel.org;

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-17 Thread Gerd Hoffmann
Hi, > No need of flag here. If vGPU driver is not loaded in the guest, > there > is no surface being managed by vGPU, in that case this size will be > zero. Ok, we certainly have the same situation with intel. When the guest driver is not loaded (yet) there is no valid surface. We should

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 5:35 PM, Gerd Hoffmann wrote: > Hi, > >> There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one >> DRM_PLANE_TYPE_CURSOR. >> Steps from gfx_update for region case would be: >> - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = >> DRM_PLANE_TYPE_PRIMARY > >> - if

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
On Fri, 2017-07-14 at 15:45 +0530, Kirti Wankhede wrote: > > On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > >   Hi, > > > > > In case when VFIO region is used to provide surface to QEMU, > > > plane_id > > > would be region index, > > > > Then we should name it "region_index" not "plane_id". > >

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > There could be only two planes, one DRM_PLANE_TYPE_PRIMARY and one > DRM_PLANE_TYPE_CURSOR. > Steps from gfx_update for region case would be: > - VFIO_DEVICE_QUERY_GFX_PLANE with plane_type = > DRM_PLANE_TYPE_PRIMARY > - if vfio_device_gfx_plane_info.size > 0, read region for primary >

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 3:31 PM, Gerd Hoffmann wrote: > Hi, > >> In case when VFIO region is used to provide surface to QEMU, plane_id >> would be region index, > > Then we should name it "region_index" not "plane_id". > >> for example region 10 could be used for primary >> surface and region 11 could

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Kirti Wankhede
On 7/14/2017 7:00 AM, Zhang, Tina wrote: > > >> -Original Message- >> From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >> Behalf Of Kirti Wankhede >> Sent: Wednesday, July 12, 2017 8:45 PM >> To: Zhang, Tina ; Gerd Hoffmann >>

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-14 Thread Gerd Hoffmann
Hi, > In case when VFIO region is used to provide surface to QEMU, plane_id > would be region index, Then we should name it "region_index" not "plane_id". > for example region 10 could be used for primary > surface and region 11 could be used for cursor surface. So in that > case, > mdev

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-13 Thread Zhang, Tina
> -Original Message- > From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > Behalf Of Kirti Wankhede > Sent: Wednesday, July 12, 2017 8:45 PM > To: Zhang, Tina ; Gerd Hoffmann > ; Tian, Kevin ; linux-

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Kirti Wankhede
On 7/12/2017 1:10 PM, Daniel Vetter wrote: > On Wed, Jul 12, 2017 at 02:31:40AM +, Zhang, Tina wrote: >> >> >>> -Original Message- >>> From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On >>> Behalf Of Daniel Vetter >>> Sent: Tuesday, July 11, 2017 5:13 PM >>>

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-12 Thread Daniel Vetter
On Wed, Jul 12, 2017 at 02:31:40AM +, Zhang, Tina wrote: > > > > -Original Message- > > From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > > Behalf Of Daniel Vetter > > Sent: Tuesday, July 11, 2017 5:13 PM > > To: Gerd Hoffmann > > Cc:

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhenyu Wang
On 2017.07.11 11:12:36 +0200, Daniel Vetter wrote: > On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > > Hi, > > > > > > +struct vfio_device_query_gfx_plane { > > > > + __u32 argsz; > > > > + __u32 flags; > > > > + struct vfio_device_gfx_plane_info plane_info; >

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
> -Original Message- > From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > Behalf Of Daniel Vetter > Sent: Tuesday, July 11, 2017 5:16 PM > To: Zhang, Tina > Cc: Tian, Kevin ; linux-ker...@vger.kernel.org; intel- >

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
> -Original Message- > From: Gerd Hoffmann [mailto:kra...@redhat.com] > Sent: Tuesday, July 11, 2017 2:08 PM > To: Zhang, Tina ; alex.william...@redhat.com; > ch...@chris-wilson.co.uk; zhen...@linux.intel.com; Lv, Zhiyuan > ; Wang, Zhi A

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
> -Original Message- > From: intel-gvt-dev [mailto:intel-gvt-dev-boun...@lists.freedesktop.org] On > Behalf Of Daniel Vetter > Sent: Tuesday, July 11, 2017 5:13 PM > To: Gerd Hoffmann > Cc: Tian, Kevin ; linux-ker...@vger.kernel.org; intel- >

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Zhang, Tina
> -Original Message- > From: Kirti Wankhede [mailto:kwankh...@nvidia.com] > Sent: Thursday, July 6, 2017 10:02 PM > To: Zhang, Tina ; alex.william...@redhat.com; > kra...@redhat.com; ch...@chris-wilson.co.uk; zhen...@linux.intel.com; Lv, > Zhiyuan

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Thu, Jul 06, 2017 at 06:29:55AM +0800, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Daniel Vetter
On Tue, Jul 11, 2017 at 08:14:08AM +0200, Gerd Hoffmann wrote: > Hi, > > > > +struct vfio_device_query_gfx_plane { > > > + __u32 argsz; > > > + __u32 flags; > > > + struct vfio_device_gfx_plane_info plane_info; > > > + __u32 plane_type; > > > + __s32 fd; /* dma-buf fd */ > > > + __u32 plane_id;

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
Hi, > > +struct vfio_device_query_gfx_plane { > > + __u32 argsz; > > + __u32 flags; > > + struct vfio_device_gfx_plane_info plane_info; > > + __u32 plane_type; > > + __s32 fd; /* dma-buf fd */ > > + __u32 plane_id; > > +}; > > + > > It would be better to have comment here about

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-11 Thread Gerd Hoffmann
> +/** > + * VFIO_DEVICE_QUERY_GFX_PLANE - _IOW(VFIO_TYPE, VFIO_BASE + 14, > + *   struct vfio_device_query_gfx_plane) > + * Return: 0 on success, -errno on failure. > + */ > + > +struct vfio_device_gfx_plane_info { > + __u64 start; > + __u64 drm_format_mod; > +

Re: [Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-06 Thread Kirti Wankhede
On 7/6/2017 3:59 AM, Tina Zhang wrote: > Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and > get the plan and its related information. > > The dma-buf's life cycle is handled by user mode and tracked by kernel. > The returned fd in struct vfio_device_query_gfx_plane can

[Intel-gfx] [PATCH v10] vfio: ABI for mdev display dma-buf operation

2017-07-05 Thread Tina Zhang
Add VFIO_DEVICE_QUERY_GFX_PLANE ioctl command to let user mode query and get the plan and its related information. The dma-buf's life cycle is handled by user mode and tracked by kernel. The returned fd in struct vfio_device_query_gfx_plane can be a new fd or an old fd of a re-exported dma-buf.