From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8C2BFC2B9F7 for ; Wed, 26 May 2021 11:31:50 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2F71F6113D for ; Wed, 26 May 2021 11:31:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2F71F6113D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=intel-gfx-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D2C4F6EC8D; Wed, 26 May 2021 11:31:49 +0000 (UTC) Received: from mail-wm1-x32a.google.com (mail-wm1-x32a.google.com [IPv6:2a00:1450:4864:20::32a]) by gabe.freedesktop.org (Postfix) with ESMTPS id 220C16EC8D for ; Wed, 26 May 2021 11:31:49 +0000 (UTC) Received: by mail-wm1-x32a.google.com with SMTP id u5-20020a7bc0450000b02901480e40338bso3153789wmc.1 for ; Wed, 26 May 2021 04:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=na04oW4mV9JUbUOkPBvtY3i7UUnCGjgsNBXRaPL+9HI=; b=kygoKcsCkhZF7xK2h2EW3cNA127jLS2NUhKSE3e+Zf8beC0blTEYuSwkSwxo451z8A 3OKeyFUrmZbla+5W2THkUYZFKpaQK/4lCt1kZrxp5diR8oYbmmwXtyH7btcudU5Pnxpg WNtzcZQy+c90Uf3a5dC++gLpbplW/FJ4oU/EjBLJE5GMMWq1PUW6KVS7rVGPX1FL69cA mYGJUW8ghVpdUGzAauH9ZwijCQipNwgLrdiUDjPjItBHnwXW6fjqmfVmeS4CBq8KbX6F TgTe10Iq4hpUNcsicb11BM8o283/yQ3BXwp6TrgdYJRm8uFMVQ9lkE/jCN1xzXcMvTMR 2l9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=na04oW4mV9JUbUOkPBvtY3i7UUnCGjgsNBXRaPL+9HI=; b=AJDvczclKzvP2mkv6HTSJJuMd8Gsf/nN9NPl41Somb9aL/DIBLE0wzERDv+Q/P76hn +b2b3j+rJ9dqetJC3NOJTC9n0lD4KgLiqQphVFZPDdO1/S9GIlOh2BVNb7oY5AkTG/oa 42JaXFaX0EOIsm/Xxru1wsRmnuST5UPeMM3CWOiB0Krw1wXecSRu5ytMIAY0j8as/751 ARGtfL1t7dR1E4Wdun7hEkT7gB9BCKekGSGFWG0mIUkyC8Hu93hVtEX0y6/ktEjNdDCY LBA81AywLov2jgSN4WfHlmdBbpr06uOe7JQeyRPGuDOxj+KgJXmvy6aog4qIk8vqF2c0 99XA== X-Gm-Message-State: AOAM533QhaYRRDK5NSNRvAUJJLUXYkG+aOP8j4bf/gyE8fy2eGF7W9xD rpqEHin5O83pAHnwQM5fdziZCyNw4tPAq9uxrZzX5A== X-Google-Smtp-Source: ABdhPJxZkxbaszLDV15dnDg1K+a2cwS/HjXOalgpXScXxcaMPhGlWzZALL24GqXWBGoLriEZblFHox5LuNlOVUFtjD0= X-Received: by 2002:a1c:7c03:: with SMTP id x3mr2975475wmc.168.1622028707726; Wed, 26 May 2021 04:31:47 -0700 (PDT) MIME-Version: 1.0 References: <20210525211753.1086069-1-jason@jlekstrand.net> <20210525211753.1086069-6-jason@jlekstrand.net> In-Reply-To: From: Daniel Stone Date: Wed, 26 May 2021 12:31:36 +0100 Message-ID: To: =?UTF-8?Q?Christian_K=C3=B6nig?= Subject: Re: [Intel-gfx] [PATCH 5/7] dma-buf: Add an API for exporting sync files (v11) X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , intel-gfx , dri-devel , Simon Ser , Sumit Semwal Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" SGkgQ2hyaXN0aWFuLAoKT24gV2VkLCAyNiBNYXkgMjAyMSBhdCAxMjowMiwgQ2hyaXN0aWFuIEvD tm5pZyA8Y2hyaXN0aWFuLmtvZW5pZ0BhbWQuY29tPiB3cm90ZToKPiBBbSAyNS4wNS4yMSB1bSAy MzoxNyBzY2hyaWViIEphc29uIEVrc3RyYW5kOgo+ID4gVGhpcyBuZXcgSU9DVEwgc29sdmVzIHRo aXMgcHJvYmxlbSBieSBhbGxvd2luZyB1cyB0byBnZXQgYSBzbmFwc2hvdCBvZgo+ID4gdGhlIGlt cGxpY2l0IHN5bmNocm9uaXphdGlvbiBzdGF0ZSBvZiBhIGdpdmVuIGRtYS1idWYgaW4gdGhlIGZv cm0gb2YgYQo+ID4gc3luYyBmaWxlLiAgSXQncyBlZmZlY3RpdmVseSB0aGUgc2FtZSBhcyBhIHBv bGwoKSBvciBJOTE1X0dFTV9XQUlUIG9ubHksCj4gPiBpbnN0ZWFkIG9mIENQVSB3YWl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z8KCkNoZWVycywK RGFuaWVsCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fCklu dGVsLWdmeCBtYWlsaW5nIGxpc3QKSW50ZWwtZ2Z4QGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpodHRw czovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2ludGVsLWdmeAo= From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.6 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 49625C47088 for ; Wed, 26 May 2021 11:31:52 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 0BC2E6113D for ; Wed, 26 May 2021 11:31:52 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 0BC2E6113D Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=fooishbar.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A2A8E6EC8E; Wed, 26 May 2021 11:31:50 +0000 (UTC) Received: from mail-wm1-x32b.google.com (mail-wm1-x32b.google.com [IPv6:2a00:1450:4864:20::32b]) by gabe.freedesktop.org (Postfix) with ESMTPS id 247376EC8E for ; Wed, 26 May 2021 11:31:49 +0000 (UTC) Received: by mail-wm1-x32b.google.com with SMTP id z137-20020a1c7e8f0000b02901774f2a7dc4so3179114wmc.0 for ; Wed, 26 May 2021 04:31:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fooishbar-org.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=na04oW4mV9JUbUOkPBvtY3i7UUnCGjgsNBXRaPL+9HI=; b=kygoKcsCkhZF7xK2h2EW3cNA127jLS2NUhKSE3e+Zf8beC0blTEYuSwkSwxo451z8A 3OKeyFUrmZbla+5W2THkUYZFKpaQK/4lCt1kZrxp5diR8oYbmmwXtyH7btcudU5Pnxpg WNtzcZQy+c90Uf3a5dC++gLpbplW/FJ4oU/EjBLJE5GMMWq1PUW6KVS7rVGPX1FL69cA mYGJUW8ghVpdUGzAauH9ZwijCQipNwgLrdiUDjPjItBHnwXW6fjqmfVmeS4CBq8KbX6F TgTe10Iq4hpUNcsicb11BM8o283/yQ3BXwp6TrgdYJRm8uFMVQ9lkE/jCN1xzXcMvTMR 2l9A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=na04oW4mV9JUbUOkPBvtY3i7UUnCGjgsNBXRaPL+9HI=; b=duhfwybWPL3HvgfUym6/KsHAywETQlc3Yrv1n95nmbSgD3ou5OoM4X9zLJRwL68+dN MWbY9BU9SOVgapetDSES+tecuFIpEcu4jj84mpSzhNXZUxSyejAs7CDcRCXYlRt//Kq4 9c9K56liWejPSGBlLVxvyD+Scl3Idr+0hqBHXP5fHowX3VUrGOrBqGpp3f5/yOFuIc62 dWe+H1cH2LET1IwVUDUfI+3wglPN/AZtUx2pRaN0l8FOestNyIu7ciwpBrBhZfBt3vnR Gc1aitTvo+s0CRJ52E6+P2VTs6D61W8qIisY6g6yU3GHaQUxmvaOOvGgDRvFYFK8v1A3 A2mg== X-Gm-Message-State: AOAM532b2dojD6dvxrS6slgKLKgreJlgy8Bx2Yw+oC8VgacbnFYJAFe+ OcBtSNUw/GvlIxoqyxpor3tVjZxJ0GUANAEGh+V8aW8oLuUXmg== X-Google-Smtp-Source: ABdhPJxZkxbaszLDV15dnDg1K+a2cwS/HjXOalgpXScXxcaMPhGlWzZALL24GqXWBGoLriEZblFHox5LuNlOVUFtjD0= X-Received: by 2002:a1c:7c03:: with SMTP id x3mr2975475wmc.168.1622028707726; Wed, 26 May 2021 04:31:47 -0700 (PDT) MIME-Version: 1.0 References: <20210525211753.1086069-1-jason@jlekstrand.net> <20210525211753.1086069-6-jason@jlekstrand.net> In-Reply-To: From: Daniel Stone Date: Wed, 26 May 2021 12:31:36 +0100 Message-ID: Subject: Re: [Intel-gfx] [PATCH 5/7] dma-buf: Add an API for exporting sync files (v11) To: =?UTF-8?Q?Christian_K=C3=B6nig?= Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Daniel Vetter , intel-gfx , dri-devel , Jason Ekstrand Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Hi Christian, On Wed, 26 May 2021 at 12:02, Christian K=C3=B6nig wrote: > Am 25.05.21 um 23:17 schrieb Jason Ekstrand: > > This new IOCTL solves this problem by allowing us to get a snapshot of > > the implicit synchronization state of a given dma-buf in the form of a > > sync file. It's effectively the same as a poll() or I915_GEM_WAIT only= , > > instead of CPU waiting directly, it encapsulates the wait operation, at > > the current moment in time, in a sync_file so we can check/wait on it > > later. As long as the Vulkan driver does the sync_file export from the > > dma-buf before we re-introduce it for rendering, it will only contain > > fences from the compositor or display. This allows to accurately turn > > it into a VkFence or VkSemaphore without any over- synchronization. > > Regarding that, why do we actually use a syncfile and not a drm_syncobj > here? > > The later should be much closer to a Vulkan timeline semaphore. How would we insert a syncobj+val into a resv though? Like, if we pass an unmaterialised syncobj+val here to insert into the resv, then an implicit-only media user (or KMS) goes to sync against the resv, what happens? Cheers, Daniel