From mboxrd@z Thu Jan 1 00:00:00 1970 From: Gerd Hoffmann Subject: Re: [PATCH v15 5/7] vfio: ABI for mdev display dma-buf operation Date: Tue, 10 Oct 2017 16:07:31 +0200 Message-ID: <1507644451.27800.10.camel@redhat.com> References: <1507629007-3183-1-git-send-email-tina.zhang@intel.com> <1507629007-3183-6-git-send-email-tina.zhang@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1507629007-3183-6-git-send-email-tina.zhang@intel.com> Sender: linux-kernel-owner@vger.kernel.org To: Tina Zhang , alex.williamson@redhat.com, chris@chris-wilson.co.uk, zhenyuw@linux.intel.com, zhiyuan.lv@intel.com, zhi.a.wang@intel.com, kevin.tian@intel.com, daniel@ffwll.ch, kwankhede@nvidia.com Cc: intel-gfx@lists.freedesktop.org, intel-gvt-dev@lists.freedesktop.org, linux-kernel@vger.kernel.org, Daniel Vetter List-Id: intel-gfx@lists.freedesktop.org On Tue, 2017-10-10 at 17:50 +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. This ioctl can be invoked > with: > 1) either flag DMABUF or REGION is set. Vendor driver returns success > and > the plane_info only when the specific kind of buffer is supported. > 2) flag PROBE is set with either DMABUF or REGION. Vendor driver > returns > success only when the specific kind of buffer is supported. > > 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. Host user mode can check > the > value of fd and to see if it needs to create new resource according > to > the new fd or just use the existed resource related to the old fd. Reviewed-by: Gerd Hoffmann cheers, Gerd