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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 175C3C48BE5 for ; Wed, 23 Jun 2021 16:47:45 +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 CAF61610A0 for ; Wed, 23 Jun 2021 16:47:44 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org CAF61610A0 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com 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 33A7C6E957; Wed, 23 Jun 2021 16:47:44 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BB196E957; Wed, 23 Jun 2021 16:47:42 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id A99241F438A5; Wed, 23 Jun 2021 17:47:40 +0100 (BST) Date: Wed, 23 Jun 2021 18:47:37 +0200 From: Boris Brezillon To: Daniel Vetter Message-ID: <20210623184737.7e47f77c@collabora.com> In-Reply-To: <20210622165511.3169559-7-daniel.vetter@ffwll.ch> References: <20210622165511.3169559-1-daniel.vetter@ffwll.ch> <20210622165511.3169559-7-daniel.vetter@ffwll.ch> Organization: Collabora X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Subject: Re: [Intel-gfx] [PATCH 06/15] drm/panfrost: Fix implicit sync 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: Tomeu Vizoso , Intel Graphics Development , DRI Development , Steven Price , linaro-mm-sig@lists.linaro.org, Alyssa Rosenzweig , Daniel Vetter , Christian =?UTF-8?B?S8O2bmln?= , linux-media@vger.kernel.org Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: base64 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" T24gVHVlLCAyMiBKdW4gMjAyMSAxODo1NTowMiArMDIwMApEYW5pZWwgVmV0dGVyIDxkYW5pZWwu dmV0dGVyQGZmd2xsLmNoPiB3cm90ZToKCj4gQ3VycmVudGx5IHRoaXMgaGFzIG5vIHByYWN0aWFs IHJlbGV2YW5jZSBJIHRoaW5rIGJlY2F1c2UgdGhlcmUncyBub3QKPiBtYW55IHdobyBjYW4gcHVs bCBvZmYgYSBzZXR1cCB3aXRoIHBhbmZyb3N0IGFuZCBhbm90aGVyIGdwdSBpbiB0aGUKPiBzYW1l IHN5c3RlbS4gQnV0IHRoZSBydWxlcyBhcmUgdGhhdCBpZiB5b3UncmUgc2V0dGluZyBhbiBleGNs dXNpdmUKPiBmZW5jZSwgaW5kaWNhdGluZyBhIGdwdSB3cml0ZSBhY2Nlc3MgaW4gdGhlIGltcGxp Y2l0I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HBhbmZyb3N0IGFsd2F5cyB1c2VzIHdyaXRlIG1vZGUgaW4g aXRzIGN1cnJlbnQgdWFwaSAqLwo+ICsJCXJldCA9IGRybV9nZW1fZmVuY2VfYXJyYXlfYWRkX2lt cGxpY2l0KGRlcHMsIGJvc1tpXSwgdHJ1ZSk7Cj4gIAkJaWYgKHJldCkKPiAgCQkJcmV0dXJuIHJl dDsKPiAgCX0KCl9fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19f CkludGVsLWdmeCBtYWlsaW5nIGxpc3QKSW50ZWwtZ2Z4QGxpc3RzLmZyZWVkZXNrdG9wLm9yZwpo dHRwczovL2xpc3RzLmZyZWVkZXNrdG9wLm9yZy9tYWlsbWFuL2xpc3RpbmZvL2ludGVsLWdmeAo= 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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 D1550C48BE5 for ; Wed, 23 Jun 2021 16:47:47 +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 957FF6112D for ; Wed, 23 Jun 2021 16:47:47 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 957FF6112D Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=collabora.com 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 5C18A6E958; Wed, 23 Jun 2021 16:47:44 +0000 (UTC) Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7BB196E957; Wed, 23 Jun 2021 16:47:42 +0000 (UTC) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id A99241F438A5; Wed, 23 Jun 2021 17:47:40 +0100 (BST) Date: Wed, 23 Jun 2021 18:47:37 +0200 From: Boris Brezillon To: Daniel Vetter Subject: Re: [PATCH 06/15] drm/panfrost: Fix implicit sync Message-ID: <20210623184737.7e47f77c@collabora.com> In-Reply-To: <20210622165511.3169559-7-daniel.vetter@ffwll.ch> References: <20210622165511.3169559-1-daniel.vetter@ffwll.ch> <20210622165511.3169559-7-daniel.vetter@ffwll.ch> Organization: Collabora X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 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: Tomeu Vizoso , Intel Graphics Development , DRI Development , Steven Price , linaro-mm-sig@lists.linaro.org, Alyssa Rosenzweig , Daniel Vetter , Christian =?UTF-8?B?S8O2bmln?= , linux-media@vger.kernel.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Tue, 22 Jun 2021 18:55:02 +0200 Daniel Vetter wrote: > Currently this has no practial relevance I think because there's not > many who can pull off a setup with panfrost and another gpu in the > same system. But the rules are that if you're setting an exclusive > fence, indicating a gpu write access in the implicit fencing system, > then you need to wait for all fences, not just the previous exclusive > fence. >=20 > panfrost against itself has no problem, because it always sets the > exclusive fence (but that's probably something that will need to be > fixed for vulkan and/or multi-engine gpus, or you'll suffer badly). > Also no problem with that against display. >=20 > With the prep work done to switch over to the dependency helpers this > is now a oneliner. >=20 > Signed-off-by: Daniel Vetter > Cc: Rob Herring > Cc: Tomeu Vizoso > Cc: Steven Price > Cc: Alyssa Rosenzweig > Cc: Sumit Semwal Reviewed-by: Boris Brezillon > Cc: "Christian K=C3=B6nig" > Cc: linux-media@vger.kernel.org > Cc: linaro-mm-sig@lists.linaro.org > --- > drivers/gpu/drm/panfrost/panfrost_job.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) >=20 > diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/pa= nfrost/panfrost_job.c > index 71cd43fa1b36..ef004d587dc4 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_job.c > +++ b/drivers/gpu/drm/panfrost/panfrost_job.c > @@ -203,9 +203,8 @@ static int panfrost_acquire_object_fences(struct drm_= gem_object **bos, > int i, ret; > =20 > for (i =3D 0; i < bo_count; i++) { > - struct dma_fence *fence =3D dma_resv_get_excl_unlocked(bos[i]->resv); > - > - ret =3D drm_gem_fence_array_add(deps, fence); > + /* panfrost always uses write mode in its current uapi */ > + ret =3D drm_gem_fence_array_add_implicit(deps, bos[i], true); > if (ret) > return ret; > } 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=-15.2 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_2 autolearn=ham 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 4559CC4743C for ; Wed, 23 Jun 2021 16:47:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 232656112D for ; Wed, 23 Jun 2021 16:47:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229726AbhFWQuB convert rfc822-to-8bit (ORCPT ); Wed, 23 Jun 2021 12:50:01 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34554 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229523AbhFWQuA (ORCPT ); Wed, 23 Jun 2021 12:50:00 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [IPv6:2a00:1098:0:82:1000:25:2eeb:e3e3]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 187C1C061574 for ; Wed, 23 Jun 2021 09:47:42 -0700 (PDT) Received: from localhost (unknown [IPv6:2a01:e0a:2c:6930:5cf4:84a1:2763:fe0d]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: bbrezillon) by bhuna.collabora.co.uk (Postfix) with ESMTPSA id A99241F438A5; Wed, 23 Jun 2021 17:47:40 +0100 (BST) Date: Wed, 23 Jun 2021 18:47:37 +0200 From: Boris Brezillon To: Daniel Vetter Cc: DRI Development , Tomeu Vizoso , Christian =?UTF-8?B?S8O2bmln?= , Intel Graphics Development , Steven Price , linaro-mm-sig@lists.linaro.org, Alyssa Rosenzweig , Daniel Vetter , linux-media@vger.kernel.org Subject: Re: [PATCH 06/15] drm/panfrost: Fix implicit sync Message-ID: <20210623184737.7e47f77c@collabora.com> In-Reply-To: <20210622165511.3169559-7-daniel.vetter@ffwll.ch> References: <20210622165511.3169559-1-daniel.vetter@ffwll.ch> <20210622165511.3169559-7-daniel.vetter@ffwll.ch> Organization: Collabora X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org On Tue, 22 Jun 2021 18:55:02 +0200 Daniel Vetter wrote: > Currently this has no practial relevance I think because there's not > many who can pull off a setup with panfrost and another gpu in the > same system. But the rules are that if you're setting an exclusive > fence, indicating a gpu write access in the implicit fencing system, > then you need to wait for all fences, not just the previous exclusive > fence. > > panfrost against itself has no problem, because it always sets the > exclusive fence (but that's probably something that will need to be > fixed for vulkan and/or multi-engine gpus, or you'll suffer badly). > Also no problem with that against display. > > With the prep work done to switch over to the dependency helpers this > is now a oneliner. > > Signed-off-by: Daniel Vetter > Cc: Rob Herring > Cc: Tomeu Vizoso > Cc: Steven Price > Cc: Alyssa Rosenzweig > Cc: Sumit Semwal Reviewed-by: Boris Brezillon > Cc: "Christian König" > Cc: linux-media@vger.kernel.org > Cc: linaro-mm-sig@lists.linaro.org > --- > drivers/gpu/drm/panfrost/panfrost_job.c | 5 ++--- > 1 file changed, 2 insertions(+), 3 deletions(-) > > diff --git a/drivers/gpu/drm/panfrost/panfrost_job.c b/drivers/gpu/drm/panfrost/panfrost_job.c > index 71cd43fa1b36..ef004d587dc4 100644 > --- a/drivers/gpu/drm/panfrost/panfrost_job.c > +++ b/drivers/gpu/drm/panfrost/panfrost_job.c > @@ -203,9 +203,8 @@ static int panfrost_acquire_object_fences(struct drm_gem_object **bos, > int i, ret; > > for (i = 0; i < bo_count; i++) { > - struct dma_fence *fence = dma_resv_get_excl_unlocked(bos[i]->resv); > - > - ret = drm_gem_fence_array_add(deps, fence); > + /* panfrost always uses write mode in its current uapi */ > + ret = drm_gem_fence_array_add_implicit(deps, bos[i], true); > if (ret) > return ret; > }