[RFC v2 5/8] drm/fence: add in-fences support

2016-07-12 Thread Gustavo Padovan
2016-07-12 Dominik Behr : > Gustavo, you added fence_put() > in __drm_atomic_helper_plane_destroy_state(), shouldn't we also add a > corresponding fence_get() in __drm_atomic_helper_plane_duplicate_state() ? Yes, my new version of the patches that already have an extra fence_get() https://git.ke

[RFC v2 5/8] drm/fence: add in-fences support

2016-07-12 Thread Dominik Behr
Gustavo, you added fence_put() in __drm_atomic_helper_plane_destroy_state(), shouldn't we also add a corresponding fence_get() in __drm_atomic_helper_plane_duplicate_state() ? On Fri, Apr 29, 2016 at 3:23 PM, Rob Clark wrote: > On Fri, Apr 29, 2016 at 3:48 AM, Daniel Stone > wrote: > > Hi, > >

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-29 Thread Rob Clark
On Fri, Apr 29, 2016 at 3:48 AM, Daniel Stone wrote: > Hi, > > On 28 April 2016 at 23:28, Rob Clark wrote: >> On Wed, Apr 27, 2016 at 2:39 AM, Daniel Vetter wrote: >>> On Tue, Apr 26, 2016 at 01:48:02PM -0700, Greg Hackmann wrote: A (per-CRTC?) array of fences would be more flexible. And e

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-29 Thread Greg Hackmann
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

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-29 Thread Daniel Stone
Hi, On 28 April 2016 at 23:28, Rob Clark wrote: > On Wed, Apr 27, 2016 at 2:39 AM, Daniel Vetter wrote: >> On Tue, Apr 26, 2016 at 01:48:02PM -0700, Greg Hackmann 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 bet

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Daniel Vetter
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 merg

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Ville Syrjälä
On Thu, Apr 28, 2016 at 07:56:19PM +0300, Ville Syrjälä wrote: > On Thu, Apr 28, 2016 at 11:36:44AM -0300, Gustavo Padovan wrote: > > 2016-04-27 Daniel Stone : > > > > > Hi, > > > > > > On 26 April 2016 at 21:48, Greg Hackmann wrote: > > > > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > > > >

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Ville Syrjälä
On Thu, Apr 28, 2016 at 07:43:16PM +0200, Daniel Vetter wrote: > On Thu, Apr 28, 2016 at 6:56 PM, Ville Syrjälä > wrote: > >> - better for tracing, can identify the buffer/fence promptly > > > > Can fences be reused somehow while still attached to a plane, or ever? > > That might cause some odd

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Daniel Vetter
On Thu, Apr 28, 2016 at 7:55 PM, Gustavo Padovan wrote: > 2016-04-28 Ville Syrjälä : > >> On Thu, Apr 28, 2016 at 07:43:16PM +0200, Daniel Vetter wrote: >> > On Thu, Apr 28, 2016 at 6:56 PM, Ville Syrjälä >> > wrote: >> > >> - better for tracing, can identify the buffer/fence promptly >> > >

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Ville Syrjälä
On Thu, Apr 28, 2016 at 11:36:44AM -0300, Gustavo Padovan wrote: > 2016-04-27 Daniel Stone : > > > Hi, > > > > On 26 April 2016 at 21:48, Greg Hackmann wrote: > > > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > > >> On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > > >>> What a

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Daniel Vetter
On Thu, Apr 28, 2016 at 6:56 PM, Ville Syrjälä wrote: >> - better for tracing, can identify the buffer/fence promptly > > Can fences be reused somehow while still attached to a plane, or ever? > That might cause some oddness if you, say, leave a fence attached to one > plane and then do a modes

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Rob Clark
On Wed, Apr 27, 2016 at 2:39 AM, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 01:48:02PM -0700, Greg Hackmann wrote: >> On 04/26/2016 01:05 PM, Daniel Vetter wrote: >> >On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: >> >>On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter w

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Daniel Vetter
On Thu, Apr 28, 2016 at 11:36:44AM -0300, Gustavo Padovan wrote: > 2016-04-27 Daniel Stone : > > > Hi, > > > > On 26 April 2016 at 21:48, Greg Hackmann wrote: > > > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > > >> On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > > >>> What a

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Gustavo Padovan
2016-04-28 Ville Syrjälä : > On Thu, Apr 28, 2016 at 07:43:16PM +0200, Daniel Vetter wrote: > > On Thu, Apr 28, 2016 at 6:56 PM, Ville Syrjälä > > wrote: > > >> - better for tracing, can identify the buffer/fence promptly > > > > > > Can fences be reused somehow while still attached to a pla

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-28 Thread Gustavo Padovan
2016-04-27 Daniel Stone : > Hi, > > On 26 April 2016 at 21:48, Greg Hackmann wrote: > > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > >> On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > >>> What are they doing that can't stuff the fences into an array > >>> instead of props? >

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-27 Thread Daniel Vetter
On Tue, Apr 26, 2016 at 01:48:02PM -0700, Greg Hackmann wrote: > On 04/26/2016 01:05 PM, Daniel Vetter wrote: > >On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > >>On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter wrote: > >>>On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville S

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-27 Thread Daniel Stone
Hi, On 26 April 2016 at 21:48, Greg Hackmann wrote: > On 04/26/2016 01:05 PM, Daniel Vetter wrote: >> On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: >>> What are they doing that can't stuff the fences into an array >>> instead of props? >> >> The hw composer interface is one in-

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Daniel Vetter
On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: > On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter wrote: > > On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville Syrjälä wrote: > > > On Tue, Apr 26, 2016 at 07:20:49PM +0200, Daniel Vetter wrote: > > > > On Tue, Apr 26, 2016 at

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville Syrjälä wrote: > > On Tue, Apr 26, 2016 at 07:20:49PM +0200, Daniel Vetter wrote: > > > On Tue, Apr 26, 2016 at 07:26:21PM +0300, Ville Syrjälä wrote: > > > > On Tue, Apr 26, 2016 at

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Tue, Apr 26, 2016 at 07:20:49PM +0200, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 07:26:21PM +0300, Ville Syrjälä wrote: > > On Tue, Apr 26, 2016 at 04:36:36PM +0200, Daniel Vetter wrote: > > > On Tue, Apr 26, 2016 at 11:14:22AM -0300, Gustavo Padovan wrote: > > > > 2016-04-26 Ville Syrjä

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Daniel Vetter
On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville Syrjälä wrote: > On Tue, Apr 26, 2016 at 07:20:49PM +0200, Daniel Vetter wrote: > > On Tue, Apr 26, 2016 at 07:26:21PM +0300, Ville Syrjälä wrote: > > > On Tue, Apr 26, 2016 at 04:36:36PM +0200, Daniel Vetter wrote: > > > > On Tue, Apr 26, 2016 at

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Tue, Apr 26, 2016 at 04:36:36PM +0200, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 11:14:22AM -0300, Gustavo Padovan wrote: > > 2016-04-26 Ville Syrjälä : > > > > > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > > > From: Gustavo Padovan > > > > > > > > There is now

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Tue, Apr 26, 2016 at 11:14:22AM -0300, Gustavo Padovan wrote: > 2016-04-26 Ville Syrjälä : > > > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > > From: Gustavo Padovan > > > > > > There is now a new property called FENCE_FD attached to every plane > > > state that rece

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Daniel Vetter
On Tue, Apr 26, 2016 at 07:26:21PM +0300, Ville Syrjälä wrote: > On Tue, Apr 26, 2016 at 04:36:36PM +0200, Daniel Vetter wrote: > > On Tue, Apr 26, 2016 at 11:14:22AM -0300, Gustavo Padovan wrote: > > > 2016-04-26 Ville Syrjälä : > > > > > > > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Daniel Vetter
On Tue, Apr 26, 2016 at 11:14:22AM -0300, Gustavo Padovan wrote: > 2016-04-26 Ville Syrjälä : > > > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > > From: Gustavo Padovan > > > > > > There is now a new property called FENCE_FD attached to every plane > > > state that rece

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Greg Hackmann
On 04/26/2016 01:05 PM, Daniel Vetter wrote: > On Tue, Apr 26, 2016 at 09:55:06PM +0300, Ville Syrjälä wrote: >> On Tue, Apr 26, 2016 at 08:23:46PM +0200, Daniel Vetter wrote: >>> On Tue, Apr 26, 2016 at 08:40:45PM +0300, Ville Syrjälä wrote: >>> But really the reason for per-plane is hw compos

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Ville Syrjälä
On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > From: Gustavo Padovan > > There is now a new property called FENCE_FD attached to every plane > state that receives the sync_file fd from userspace via the atomic commit > IOCTL. I still don't like this property abuse. Also with

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-26 Thread Gustavo Padovan
2016-04-26 Ville Syrjälä : > On Mon, Apr 25, 2016 at 07:33:25PM -0300, Gustavo Padovan wrote: > > From: Gustavo Padovan > > > > There is now a new property called FENCE_FD attached to every plane > > state that receives the sync_file fd from userspace via the atomic commit > > IOCTL. > > I st

[RFC v2 5/8] drm/fence: add in-fences support

2016-04-25 Thread Gustavo Padovan
From: Gustavo Padovan There is now a new property called FENCE_FD attached to every plane state that receives the sync_file fd from userspace via the atomic commit IOCTL. The fd is then translated to a fence (that may be a fence_collection subclass or just a normal fence) and then used by DRM to