Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752872AbdDKRnk (ORCPT ); Tue, 11 Apr 2017 13:43:40 -0400 Received: from anholt.net ([50.246.234.109]:47280 "EHLO anholt.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751812AbdDKRni (ORCPT ); Tue, 11 Apr 2017 13:43:38 -0400 From: Eric Anholt To: Chris Wilson Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, Gustavo Padovan Subject: Re: [PATCH 3/3] drm/vc4: Add support for dma-buf fencing. In-Reply-To: <20170411093531.GY6834@nuc-i3427.alporthouse.com> References: <20170411014414.20280-1-eric@anholt.net> <20170411014414.20280-3-eric@anholt.net> <20170411093531.GY6834@nuc-i3427.alporthouse.com> User-Agent: Notmuch/0.22.2+1~gb0bcfaa (http://notmuchmail.org) Emacs/24.5.1 (x86_64-pc-linux-gnu) Date: Tue, 11 Apr 2017 10:43:35 -0700 Message-ID: <87mvbmx2k8.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2111 Lines: 54 --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Chris Wilson writes: > On Mon, Apr 10, 2017 at 06:44:14PM -0700, Eric Anholt wrote: >> This is needed for proper synchronization with display on another DRM >> device (pl111 or tinydrm) with buffers produced by vc4 V3D. Fixes the >> new igt vc4_dmabuf_poll testcase, and rendering of one of the glmark2 >> desktop tests on pl111+vc4. >>=20 >> This doesn't yet introduce waits on other device's fences before vc4's >> rendering/display, because I don't have testcases for them. >>=20 >> Signed-off-by: Eric Anholt >> Cc: Gustavo Padovan >> --- >> +static void vc4_fence_release(struct dma_fence *fence) >> +{ >> + struct vc4_fence *f =3D to_vc4_fence(fence); >> + >> + kfree_rcu(f, base.rcu); >> +} > > Unless you have a plan to do more here, looks like you can just use > the default dma_fence_free as the release callback. > -Chris Yeah, this pattern came from etnaviv/msm (which I had used as reference), who both put their .base second. I wonder if they would want to flip the order of their fields and drop their fence_release, too. --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE/JuuFDWp9/ZkuCBXtdYpNtH8nugFAljtFccACgkQtdYpNtH8 nujoiA/+PcaPSWOuBLDKyv2aeC44FxMx5B+SNFZ9DN47otqp8XSUd6SszIghEVDt Sy4eQemvpuMtYNDOn6O6XzdRLoi29/D6d82d7sO1oSzYZCrr4xVI0xy9BXHPzqTS qJkulBoXw69CalKumpjRjOTyh8o8eAyS5A7Kl9m8I/edDqEzq7zyKNW9fpRvx3pm jvwdPXyJwPUBXUvN8cHnWHVvX28oFZjOp3q0y2TtbKfqCMH9lY0RecSuRxon9d4G pZofvy0bubSLYrK/nEDKTtvgXgEcogBCytZtcyQoW5CP+VdCItzvwNpege/Hx+RN 6Hf4qnUeqHGRUWs0aQEFGPv0lXeGbhzHXsgAVAyTWrtC9nZ2GPJW5w6ugcl4I9H5 vSSnOnlloK9SuacM4N/s+JAnJtMOIdq6vYEZxc0LJ+Qxwc3wG52kqIfx/lF3EKY9 45Y4ro5Nfpjr54EFr7DWkv1xbGZFkOekzxUXocG8vFVycln2eMSo+7HisZ5Sfy9I QNuDKzcjyMwm8QlZi7j1fSS2jlBJTdE1V1qV1qMQPk1ggCgsMhk99uKU4Z3bRErj bNHSDD3EKyzTgi23ftkTyF7RkpwtYPB1amqqU5vjmOEFpIWuyujcPj4C17Fz4Lga G6Zi1ZOae8LpvIu62kGZZwqnyygIj/SwI/8W5sxliwRHxQbWTzY= =XLIx -----END PGP SIGNATURE----- --=-=-=--