[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <237F54289DF84E4997F34151298ABEBC7C56EBE0@SHSMSX101.ccr.corp.intel.com>
Date: Tue, 20 Jun 2017 08:41:44 +0000
From: "Zhang, Tina" <tina.zhang@...el.com>
To: Alex Williamson <alex.williamson@...hat.com>,
Gerd Hoffmann <kraxel@...hat.com>
CC: "intel-gfx@...ts.freedesktop.org" <intel-gfx@...ts.freedesktop.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Kirti Wankhede <kwankhede@...dia.com>,
"Chen, Xiaoguang" <xiaoguang.chen@...el.com>,
"intel-gvt-dev@...ts.freedesktop.org"
<intel-gvt-dev@...ts.freedesktop.org>,
"Lv, Zhiyuan" <zhiyuan.lv@...el.com>,
"Wang, Zhi A" <zhi.a.wang@...el.com>,
"Wang, Zhenyu Z" <zhenyu.z.wang@...el.com>
Subject: RE: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf
operations
Hi,
Thanks for all the comments. Here are the summaries:
1. Modify the structures to make it more general.
struct vfio_device_gfx_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 generation;
};
struct vfio_device_query_gfx_plane {
__u32 argsz;
__u32 flags;
#define VFIO_GFX_PLANE_FLAGS_REGION_ID (1 << 0)
#define VFIO_GFX_PLANE_FLAGS_PLANE_ID (1 << 1)
struct vfio_device_gfx_plane_info plane_info;
__u32 id;
};
2. Remove dmabuf mgr fd and add these two ioctl commands to the vfio device fd.
VFIO_DEVICE_QUERY_GFX_PLANE : used to query vfio_device_gfx_plane_info.
VFIO_DEVICE_GET_DMABUF_FD: used to create and return the dmabuf fd.
Am I correct? Thanks.
Tina
> -----Original Message-----
> From: Intel-gfx [mailto:intel-gfx-bounces@...ts.freedesktop.org] On Behalf Of
> Alex Williamson
> Sent: Monday, June 19, 2017 10:56 PM
> To: Gerd Hoffmann <kraxel@...hat.com>
> Cc: intel-gfx@...ts.freedesktop.org; linux-kernel@...r.kernel.org; Kirti
> Wankhede <kwankhede@...dia.com>; Chen, Xiaoguang
> <xiaoguang.chen@...el.com>; intel-gvt-dev@...ts.freedesktop.org; Lv, Zhiyuan
> <zhiyuan.lv@...el.com>
> Subject: Re: [Intel-gfx] [PATCH v9 5/7] vfio: Define vfio based dma-buf
> operations
>
> On Mon, 19 Jun 2017 08:38:32 +0200
> Gerd Hoffmann <kraxel@...hat.com> wrote:
>
> > Hi,
> >
> > > My suggestion was to use vfio device fd for this ioctl and have
> > > dmabuf mgr fd as member in above query_plane structure, for region
> > > type it would be set to 0.
> >
> > Region type should be DRM_PLANE_TYPE_PRIMARY
> >
> > > Can't mmap that page to get surface information. There is no way to
> > > synchronize between QEMU reading this mmapped region and vendor
> > > driver writing it. There could be race condition in these two
> > > operations.
> > > Read
> > > on this page should be trapped and blocking, so that surface in that
> > > region is only updated when its asked for.
> >
> > Does it make sense to have a "generation" field in the plane_info
> > struct (which gets increased each time the struct changes) ?
>
> It seems less cumbersome than checking each field to see if it has changed.
> Thanks,
>
> Alex
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx@...ts.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/intel-gfx
Powered by blists - more mailing lists