From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756444AbdJJOHi (ORCPT ); Tue, 10 Oct 2017 10:07:38 -0400 Received: from mx1.redhat.com ([209.132.183.28]:51948 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756233AbdJJOHf (ORCPT ); Tue, 10 Oct 2017 10:07:35 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 350E27E448 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=kraxel@redhat.com Message-ID: <1507644451.27800.10.camel@redhat.com> Subject: Re: [PATCH v15 5/7] vfio: ABI for mdev display dma-buf operation From: Gerd Hoffmann 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 Date: Tue, 10 Oct 2017 16:07:31 +0200 In-Reply-To: <1507629007-3183-6-git-send-email-tina.zhang@intel.com> References: <1507629007-3183-1-git-send-email-tina.zhang@intel.com> <1507629007-3183-6-git-send-email-tina.zhang@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.27]); Tue, 10 Oct 2017 14:07:35 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.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