Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753432AbcD1UkO (ORCPT ); Thu, 28 Apr 2016 16:40:14 -0400 Received: from mail-oi0-f49.google.com ([209.85.218.49]:36478 "EHLO mail-oi0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752819AbcD1UkM convert rfc822-to-8bit (ORCPT ); Thu, 28 Apr 2016 16:40:12 -0400 MIME-Version: 1.0 X-Originating-IP: [2a02:168:56b5:0:ac27:b86c:7764:9429] In-Reply-To: <20160428181729.GH4329@intel.com> References: <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> <20160428143644.GA3496@joana> <20160428165619.GD4329@intel.com> <20160428181729.GH4329@intel.com> Date: Thu, 28 Apr 2016 22:40:10 +0200 X-Google-Sender-Auth: v8VJLxpsseoTSw_swOBxb8ccDFw Message-ID: Subject: Re: [RFC v2 5/8] drm/fence: add in-fences support From: Daniel Vetter To: =?UTF-8?B?VmlsbGUgU3lyasOkbMOk?= Cc: Gustavo Padovan , Daniel Stone , Greg Hackmann , Gustavo Padovan , Daniel Stone , Riley Andrews , dri-devel , Linux Kernel Mailing List , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , John Harrison Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1084 Lines: 26 On Thu, Apr 28, 2016 at 8:17 PM, Ville Syrjälä wrote: >> > - implicit fences also needs one fence per plane/fb, so it will be good to >> > match with that. >> >> We would actually need a fence per object rather than per fb. > > I guess you could overcome this by automagically creating a merged fence > for a multi-obj fb? Yeah, and the android hwc does this for you already. You get passed a surface (or whatever it's called exactly) plus a fence, and the surface contains the gralloc/native buffer thing, which would contain multiple dma-buf handles if your hw does planar stuff that way. I think everyone else who wants explicit fencing will go with the same or similar model, so it's just about implicit fencing. And there we can easily construct the fence_collection from a drm_framebuffer ourselves with a small helper in each driver (or shared one in cma, although cma doesn't yet grok reserverations/implicitly attached fences). -Daniel -- Daniel Vetter Software Engineer, Intel Corporation +41 (0) 79 365 57 48 - http://blog.ffwll.ch