Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp560789imu; Fri, 9 Nov 2018 02:14:37 -0800 (PST) X-Google-Smtp-Source: AJdET5c41BljD7CH9pF0rHLwoz12Jw5WQfu+hxhZV5sZBmlp9XnJglLW/LRT8kmrLWOa7HScMnp4 X-Received: by 2002:a17:902:6b0a:: with SMTP id o10-v6mr8286152plk.208.1541758477044; Fri, 09 Nov 2018 02:14:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1541758477; cv=none; d=google.com; s=arc-20160816; b=KksQoeHdxoLi4E9tDrCEAvFmguO+57B0588EMY4ORUfbPloGYFh7CmkLVA7vGIb0hC rQClSo/XweNFmqbMQdV01gj9tXJEkP6C7pare6wRK8RGC7VUvONvEtfM9PFFHKqfkAEW XcrNEJmmgKBD2F6RJKfrI/kwYoz+TLVLs1QV4+DSbRTa6CEOjTYVDN5vSw0esw6cqBH4 Oia2qJRK0CLWa+lgG+s+RUjq9KXKhkM1xekumAo2Lx5dmOKByt/mbLU/RNUOGtN2MV9k omMfrznE0AVbWi4DKssZM8qIsZQb7WcB8KoJw7fcA1gZ/N4T1Jb/pLM5kOQjvLPFebyf 5UNg== 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=pSODoo3a0lRSgruGOiWC2Fyt2Koa0hK0oxf5334WM/g=; b=plvQYXb2Hz5tjE+iOM4ZD0DmbV9F9Za9yuWK7MEN/sm+kqBcMEyvFGRTTOxFmXV1dc 5lOc+PP1HEhyBww1ROuDAgU3XLf0/NMi0ybzh91L2ChAjDygEqx93cTo05nifEcj1N1n xb+DWhhk2TxqXSOmTdpxcsHegE5N5SjOE2dyXyHMaYUFqv+mv48QbfvvXPOz2giTjvfr mBoj+Wv317XJVTcdnr8PnI74d4IsJRLsJfd+Zj9XpdrG5NerknosYloAnFHUj3A59cC1 hoWgtKqFF/322iu0deovkgt5g9wUBYxhQPdVTwvUVDPNAQNt00pItIaSwfwTYKMH4bNw ZSAA== 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 a19si338403pgj.429.2018.11.09.02.14.21; Fri, 09 Nov 2018 02:14:37 -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 S1727861AbeKITxv (ORCPT + 99 others); Fri, 9 Nov 2018 14:53:51 -0500 Received: from mx1.redhat.com ([209.132.183.28]:47078 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727532AbeKITxv (ORCPT ); Fri, 9 Nov 2018 14:53:51 -0500 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id DFA9E307DAB5; Fri, 9 Nov 2018 10:13:56 +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 3CCE45C219; Fri, 9 Nov 2018 10:13:56 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 86A748FC0; Fri, 9 Nov 2018 11:13:54 +0100 (CET) Date: Fri, 9 Nov 2018 11:13:54 +0100 From: Gerd Hoffmann To: Emil Velikov Cc: Robert Foss , David Airlie , ML dri-devel , "open list:VIRTIO GPU DRIVER" , "Linux-Kernel@Vger. Kernel. Org" , Rob Herring , Gustavo Padovan , Emil Velikov Subject: Re: [PATCH v4 3/4] drm/virtio: add in/out fence support for explicit synchronization Message-ID: <20181109101354.dc7cv4i4etu3bkhh@sirius.home.kraxel.org> References: <20181105114152.2088-1-robert.foss@collabora.com> <20181105114152.2088-4-robert.foss@collabora.com> 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.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 09 Nov 2018 10:13:57 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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. Also: should we use separate fields for in/out fds? cheers, Gerd