Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp3844297imu; Mon, 12 Nov 2018 01:11:30 -0800 (PST) X-Google-Smtp-Source: AJdET5eBTjIAoykCw0lkWmryvoMuHQsFBv+Xfs4PabhG7rlL6FepZa11/jqrqrrtSV3h3I3V09ZP X-Received: by 2002:a63:a16:: with SMTP id 22mr137213pgk.318.1542013890637; Mon, 12 Nov 2018 01:11:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542013890; cv=none; d=google.com; s=arc-20160816; b=OZuV2sOETTtWhBgBr4QDIhY35JIue0MMaNsqR27clTRWbTBQ9Ps522z6oiOFezOwOC 49B8aFSLxSUmvpmH6Xymgh0Doxic+ucDiTDBaavKcUfh0FDrN2t7KKL+s/qupql/CPqj H/y6yKdlVWyg4BOt9PkSMxxN5pIFjrasrIajZJSoHEw32BbpTYBrlP/gnp+/KVpG861h Gwwtdj6wfNAiWryQSlrRoCspV/HDbKL3Uq1J0MpPLD2pxW2yELiIq46q6UA1m0FRURE6 +odwS1NgIrZAGVB0bU6lss8rPRy3eOGUuVi6s/SLDsRprZEJnF37HPKafMoUVe9Ho5Qm mIhw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=DLCxDu7HiLzjHBbbkMZh6zaOy2mzEA3OE/Whh2R5pl4=; b=hgyCBHVOTMkVtMe140xTO0on24PoFAD6Vs0psdr0fFLEGCMTZev29oTqft9COyNwFj ReLf7YDVTY4Cndhzg+BBBpkrmI9N0On8ZcCTm4emRoQWhzIhYyba8lRZ4fOYZdD3K6oR f31rxv++nExb5BLfFVqDJ9dp61/hzYyck6kdeJvuub6Cqx9fkK7xtU8vl34JpioZwYWF hQaPiBiAhZmZC7xki74wXpEhWSOLvkhU/94nGrhvVIvucJ7ZpEyE80n9uFILjgJbOsJY a4XoPSs3v4a8Yhnavl5VyioKPEpNNUVdA3xu8PYiCjWK5dpla9w4pEPQPdEMn0uq5PR3 r+3w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u6si15675486pgl.561.2018.11.12.01.11.15; Mon, 12 Nov 2018 01:11:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729206AbeKLTCp (ORCPT + 99 others); Mon, 12 Nov 2018 14:02:45 -0500 Received: from mx1.redhat.com ([209.132.183.28]:10833 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726220AbeKLTCp (ORCPT ); Mon, 12 Nov 2018 14:02:45 -0500 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 739B63001571; Mon, 12 Nov 2018 09:10:28 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-158.ams2.redhat.com [10.36.116.158]) by smtp.corp.redhat.com (Postfix) with ESMTP id E120F600C1; Mon, 12 Nov 2018 09:10:27 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 0ADEB541DE; Mon, 12 Nov 2018 10:10:27 +0100 (CET) Date: Mon, 12 Nov 2018 10:10:27 +0100 From: Gerd Hoffmann To: Robert Foss Cc: Emil Velikov , Gustavo Padovan , "Linux-Kernel@Vger. Kernel. Org" , ML dri-devel , "open list:VIRTIO GPU DRIVER" , David Airlie , Emil Velikov Subject: Re: [PATCH v4 3/4] drm/virtio: add in/out fence support for explicit synchronization Message-ID: <20181112091027.3bh4gi5mvu73tcqh@sirius.home.kraxel.org> References: <20181105114152.2088-1-robert.foss@collabora.com> <20181105114152.2088-4-robert.foss@collabora.com> <20181109101354.dc7cv4i4etu3bkhh@sirius.home.kraxel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: NeoMutt/20180716 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.46]); Mon, 12 Nov 2018 09:10:28 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Nov 09, 2018 at 06:13:52PM +0100, Robert Foss wrote: > Hey Gerd, > > On 2018-11-09 11:13, Gerd Hoffmann wrote: > > On Mon, Nov 05, 2018 at 05:25:05PM +0000, Emil Velikov wrote: > > > On Mon, 5 Nov 2018 at 11:42, Robert Foss wrote: > > > > > > > > When the execbuf call receives an in-fence it will get the dma_fence > > > > related to that fence fd and wait on it before submitting the draw call. > > > > > > > > On the out-fence side we get fence returned by the submitted draw call > > > > and attach it to a sync_file and send the sync_file fd to userspace. On > > > > error -1 is returned to userspace. > > > > > > > > Signed-off-by: Gustavo Padovan > > > > Signed-off-by: Robert Foss > > > > Suggested-by: Rob Herring > > > > Reviewed-by: Emil Velikov > > > > --- > > > > > > > > Changes since v3: > > > > - Move all in_fence handling to the same VIRTGPU_EXECBUF_FENCE_FD_IN block > > > Fwiw my suggestion was to explicitly document whether the IOCTL can > > > support, simultaneously, IN and OUT fence. > > > > Yes, that would be good. Code looks like it is supposed to work, but > > explicitly saying so in the commit message would be nice. > > On it! Will send out a v5. > > > > > Also: should we use separate fields for in/out fds? > > I'm not sure I understand which fields you're referring to. fence_in_fd & fence_out_fd in the ioctl struct (patch #2). cheers, Gerd