Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752668AbcD2VOf (ORCPT ); Fri, 29 Apr 2016 17:14:35 -0400 Received: from mail-pf0-f178.google.com ([209.85.192.178]:33390 "EHLO mail-pf0-f178.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751829AbcD2VOd (ORCPT ); Fri, 29 Apr 2016 17:14:33 -0400 Subject: Re: [RFC v2 5/8] drm/fence: add in-fences support To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= , Gustavo Padovan , Gustavo Padovan , Daniel Stone , Riley Andrews , dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, =?UTF-8?Q?Arve_Hj=c3=b8nnev=c3=a5g?= , John Harrison References: <20160426101050.GN4329@intel.com> <20160426141422.GG7857@joana> <20160426143635.GW8291@phenom.ffwll.local> <20160426162621.GU4329@intel.com> <20160426172049.GB2558@phenom.ffwll.local> <20160426174045.GC4329@intel.com> <20160426182346.GC2558@phenom.ffwll.local> <20160426185506.GH4329@intel.com> <20160426200505.GD2558@phenom.ffwll.local> <571FD402.6050407@google.com> <20160427063904.GH2558@phenom.ffwll.local> From: Greg Hackmann Message-ID: <5723CEB7.8090609@google.com> Date: Fri, 29 Apr 2016 14:14:31 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160427063904.GH2558@phenom.ffwll.local> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1199 Lines: 24 On 04/26/2016 11:39 PM, Daniel Vetter wrote: >> A (per-CRTC?) array of fences would be more flexible. And even in the cases >> where you could make a 1-to-1 mapping between planes and fences, it's not >> that much more work for userspace to assemble those fences into an array >> anyway. > > I'm ok with an array too if that's what you folks prefer (it's meant to be > used by you after all). I just don't want just 1 fence for the entire op, > forcing userspace to first merge them all together. That seems silly. > > One side-effect of that is that we'd also have to rework all the internal > bits and move fences around in atomic. Which means change a pile of > drivers. Not sure that's worth it, but I'd be ok either way really. > -Daniel > It's not a strong preference on my end. The 1:1 plane-to-layer mapping breaks down somewhat on hardware where you need to split large hwcomposer layers across multiple DRM planes. That said, you can force that case to fit by just dup()ing the fence a bunch of times or arbitrarily picking one of the planes to assign the fence to. Either is kludgey, but I can't argue it's kludgey enough to justify refactoring a bunch of existing driver code.