Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752006AbdFSOzo (ORCPT ); Mon, 19 Jun 2017 10:55:44 -0400 Received: from mx1.redhat.com ([209.132.183.28]:59574 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751946AbdFSOzi (ORCPT ); Mon, 19 Jun 2017 10:55:38 -0400 DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 2D7C385359 Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx01.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=alex.williamson@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 2D7C385359 Date: Mon, 19 Jun 2017 08:55:30 -0600 From: Alex Williamson To: Gerd Hoffmann Cc: Kirti Wankhede , Xiaoguang Chen , chris@chris-wilson.co.uk, intel-gfx@lists.freedesktop.org, linux-kernel@vger.kernel.org, zhenyuw@linux.intel.com, zhiyuan.lv@intel.com, intel-gvt-dev@lists.freedesktop.org, zhi.a.wang@intel.com, kevin.tian@intel.com Subject: Re: [PATCH v9 5/7] vfio: Define vfio based dma-buf operations Message-ID: <20170619085530.1f5e46dc@w520.home> In-Reply-To: <1497854312.4207.4.camel@redhat.com> References: <1497513611-2814-1-git-send-email-xiaoguang.chen@intel.com> <1497513611-2814-6-git-send-email-xiaoguang.chen@intel.com> <1497542438.29252.1.camel@redhat.com> <20170615143833.7526351b@w520.home> <24c4880b-24f5-ea07-834c-c77d3e895c78@nvidia.com> <1497854312.4207.4.camel@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.25]); Mon, 19 Jun 2017 14:55:33 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 896 Lines: 27 On Mon, 19 Jun 2017 08:38:32 +0200 Gerd Hoffmann 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