Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753512AbcCaKFv (ORCPT ); Thu, 31 Mar 2016 06:05:51 -0400 Received: from mailout1.samsung.com ([203.254.224.24]:50124 "EHLO mailout1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751607AbcCaKFs (ORCPT ); Thu, 31 Mar 2016 06:05:48 -0400 MIME-version: 1.0 Content-type: text/plain; charset=utf-8 X-AuditID: cbfee68d-f79e86d0000012da-ed-56fcf67a0a94 Content-transfer-encoding: 8BIT Message-id: <56FCF67A.8090109@samsung.com> Date: Thu, 31 Mar 2016 19:05:46 +0900 From: Inki Dae User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 To: Daniel Stone Cc: Rob Clark , Linux Kernel Mailing List , "dri-devel@lists.freedesktop.org" , =?UTF-8?B?QXJ2ZSBIasO4bm5ldsOlZw==?= , Daniel Vetter , Riley Andrews , Gustavo Padovan , John Harrison Subject: Re: [RFC 0/6] drm/fences: add in-fences to DRM References: <1458758847-21170-1-git-send-email-gustavo@padovan.org> <56F3A2DC.8080507@samsung.com> <56F47D01.7040508@samsung.com> <56F88828.5050304@samsung.com> <56F9E613.1030902@samsung.com> <56FCD5A3.4040700@samsung.com> In-reply-to: X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFtrOIsWRmVeSWpSXmKPExsWyRsSkQLfq258wg54dehbv/95ns1j48C6z xZXW6awWV76+Z7P4tLqV3WLS0wdsFpd3zWGzeL3pL6PF84U/mB04Pbbt3sbq8ff5dRaPvd8W sHi8+LqN2WPnrLvsHov3vGTyuN99nMnj8ya5AI4oLpuU1JzMstQifbsEroyJz3cyFpwWr2j7 rNLAOFG4i5GDQ0LAROLTbZEuRk4gU0ziwr31bF2MXBxCAisYJZ5cXMwMU7PiHh9EfCmjxN27 z9lBGngFBCV+TL7HAlLDLCAvceRSNoSpLjFlSi5E+QNGiTuXtrFBlGtJtPW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2z4/pRxAqPALCTnzUI4bxbCeQsYmVcxSqQWJBcUJ6XnGuWl lusVJ+YWl+al6yXn525iBCeBZ9I7GA/vcj/EKMDBqMTDeyH5T5gQa2JZcWXuIUYJDmYlEV7m j0Ah3pTEyqrUovz4otKc1OJDjKZA/01klhJNzgcmqLySeENjEzMjSyNzQwsjY3Mlcd7H/9eF CQmkJ5akZqemFqQWwfQxcXBKNTBqS3F/rmu8n2545PKSP/291gHPHRZVPMxU/B20uTDdSWH5 Wd6fMx+a6LfM2VZt8pY/ToWNyXy2+q1D09cuauXrPxmVGe9fc+nN0p4Nr/ti6w7uD4h/K++v O2dr5eXnRsdOvysU+FbknKF0Jvt+2a6jbhfmf7jeoWTYpVigaf1aRd3y5smYlf+VWIozEg21 mIuKEwFqLTgGGAMAAA== DLP-Filter: Pass X-MTR: 20000000000000000@CPGS X-CFilter-Loop: Reflected Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2970 Lines: 49 Hi Daniel, 2016년 03월 31일 18:35에 Daniel Stone 이(가) 쓴 글: > Hi Inki, > > On 31 March 2016 at 08:45, Inki Dae wrote: >> 2016년 03월 29일 22:23에 Rob Clark 이(가) 쓴 글: >>> On Mon, Mar 28, 2016 at 10:18 PM, Inki Dae wrote: >>>> In addition, I wonder how explicit and implicit fences could coexist together. >>>> Rob said, >>>> "Implicit sync ofc remains the default, but userspace could opt-in to explicit sync instead" >>>> >>>> This would mean that if we use explicit sync for user-space then it coexists with implicit sync. However, these two sync fences can't see same DMA buffer because explicit fence has a different file object from implicit one. >>>> So in this case, I think explicit fence would need to be hung up on the reservation object of dmabuf object somehow. Otherwise, although they coexist together, are these fences - explicit and implicit - used for differenct purpose separately? >>>> >>> >>> I'm not entirely sure about coexistance at the same time. It ofc >>> shouldn't be a problem for one kernel to support both kinds of >>> userspace (pure explicit and pure implicit). And how this would work >>> on kms atomic ioctl (compositor/consumer) side seems clear enough.. >>> ie. some sort of flag, which if set user provides an explicit fence >>> fd, and if not set we fall back to current behaviour (ie. get fences >>> from resv object). >> >> With this patch series, users can register explicit fence(s) to atomic kms(consumer side) through kms property interface for the explicit sync. >> >> However, now several DRM drivers(also consumer) already have beeen using implicit fence. So while GPU(producer side) is accessing DMA buffer after registering its explicit fence to atomic kms, and if atomic commit is requested by user-space, then atomic helper framework will try to synchronize with the producer - waiting for the signal of GPU side(producer), and device specific page flip function will also try to do same thing. > > Well, it has to be one or the other: mixing explicit and implicit, > defeats the purpose of using explicit fencing. So, when explicit > fencing is in use, implicit fences must be ignored. > >> As of now, it seems that this wouldn't be optional but mandatory if explicit fence support is added to the atomic helper framework. This would definitely be duplication and it seems not clear enough even if one of them is just skipped in runtime. > > Drivers would have to opt in to explicit fencing support, and part of > that would be ensuring that the driver does not wait on implicit > fences when the user has requested explicit fencing be used. > Then, existing drivers would need additional works for explicit fencing support. This wouldn't be really what the drivers have to but should be handled with this patch series because this would affect exising device drivers which use implicit fencing. Thanks, Inki Dae > Cheers, > Daniel > >