From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1424283AbcFMVVb (ORCPT ); Mon, 13 Jun 2016 17:21:31 -0400 Received: from mail-yw0-f193.google.com ([209.85.161.193]:36700 "EHLO mail-yw0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1423303AbcFMVV3 (ORCPT ); Mon, 13 Jun 2016 17:21:29 -0400 Date: Mon, 13 Jun 2016 18:21:24 -0300 From: Gustavo Padovan To: Chris Wilson , dri-devel@lists.freedesktop.org, marcheu@google.com, Daniel Stone , seanpaul@google.com, Daniel Vetter , linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, Gustavo Padovan , John Harrison , m.chehab@samsung.com Subject: Re: [PATCH 2/3] dma-buf/sync_file: add sync_file_get_fence() Message-ID: <20160613212124.GA17050@joana> Mail-Followup-To: Gustavo Padovan , Chris Wilson , dri-devel@lists.freedesktop.org, marcheu@google.com, Daniel Stone , seanpaul@google.com, Daniel Vetter , linux-kernel@vger.kernel.org, laurent.pinchart@ideasonboard.com, Gustavo Padovan , John Harrison , m.chehab@samsung.com References: <1465484730-8128-1-git-send-email-gustavo@padovan.org> <1465484730-8128-2-git-send-email-gustavo@padovan.org> <20160610122350.GA12354@nuc-i3427.alporthouse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20160610122350.GA12354@nuc-i3427.alporthouse.com> User-Agent: Mutt/1.6.1 (2016-04-27) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 2016-06-10 Chris Wilson : > On Thu, Jun 09, 2016 at 12:05:29PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > Creates a function that given an sync file descriptor returns a > > fence_collection containing all fences in the sync_file. > > > > If there is only one fence in the sync_file this fence itself is returned, > > however if there is more than one, a fence_collection fence is returned. > > > > v2: Comments by Daniel Vetter > > - Adapt to new version of fence_collection_init() > > - Hold a reference for the fence we return > > > > v3: - Adapt to use fput() directly > > - rename to sync_file_get_fence() as we always return one fence > > > > v4: Adapt to use fence_array > > The sync_file looks just like a fence_array plus struct file integration. > Is there a good reason why we cannot just use fence_array here? I think the only reason is because I haven't thought about this before. If we add proper support to fence_array we can make sync_files even simpler. Gustavo