Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755290AbdGKGH4 (ORCPT ); Tue, 11 Jul 2017 02:07:56 -0400 Received: from mx1.redhat.com ([209.132.183.28]:64086 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751213AbdGKGHz (ORCPT ); Tue, 11 Jul 2017 02:07:55 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com F0A32C04B316 Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=kraxel@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com F0A32C04B316 Message-ID: <1499753263.8257.1.camel@redhat.com> Subject: Re: [PATCH v10] 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 Date: Tue, 11 Jul 2017 08:07:43 +0200 In-Reply-To: <1499293795-6265-1-git-send-email-tina.zhang@intel.com> References: <1499293795-6265-1-git-send-email-tina.zhang@intel.com> Content-Type: text/plain; charset="UTF-8" Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Tue, 11 Jul 2017 06:07:55 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 884 Lines: 35 > +/** > + * 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; > + __u32 drm_format; > + __u32 width; > + __u32 height; > + __u32 stride; > + __u32 size; > + __u32 x_pos; > + __u32 y_pos; > +}; Do we want keep that as separate struct? Given we now have only a single struct using that as sub-struct it looks pointless, at least from a API point of view. Does the driver use the struct internally? > + > +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; What is plane_id? cheers, Gerd