Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754140AbdDLMtR (ORCPT ); Wed, 12 Apr 2017 08:49:17 -0400 Received: from mail-wm0-f67.google.com ([74.125.82.67]:36654 "EHLO mail-wm0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753458AbdDLMtN (ORCPT ); Wed, 12 Apr 2017 08:49:13 -0400 Date: Wed, 12 Apr 2017 14:49:04 +0200 From: Daniel Vetter To: Eric Anholt Cc: Chris Wilson , Gustavo Padovan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/3] drm/vc4: Add support for dma-buf fencing. Message-ID: <20170412124904.4f7bot45rcesqnrz@phenom.ffwll.local> Mail-Followup-To: Eric Anholt , Chris Wilson , Gustavo Padovan , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org References: <20170411014414.20280-1-eric@anholt.net> <20170411014414.20280-3-eric@anholt.net> <20170411093531.GY6834@nuc-i3427.alporthouse.com> <87mvbmx2k8.fsf@eliezer.anholt.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <87mvbmx2k8.fsf@eliezer.anholt.net> X-Operating-System: Linux phenom 4.9.0-2-amd64 User-Agent: NeoMutt/20170306 (1.8.0) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1365 Lines: 37 On Tue, Apr 11, 2017 at 10:43:35AM -0700, Eric Anholt wrote: > 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. > >> > >> This doesn't yet introduce waits on other device's fences before vc4's > >> rendering/display, because I don't have testcases for them. > >> > >> Signed-off-by: Eric Anholt > >> Cc: Gustavo Padovan > >> --- > >> +static void vc4_fence_release(struct dma_fence *fence) > >> +{ > >> + struct vc4_fence *f = 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. Sounds reasonable and gets rid of a bit of code. -Daniel -- Daniel Vetter Software Engineer, Intel Corporation http://blog.ffwll.ch