[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Emil Velikov
On 31 October 2016 at 17:44, Rob Clark wrote: > On Mon, Oct 31, 2016 at 1:15 PM, Emil Velikov > wrote: >> On 31 October 2016 at 16:39, Rob Clark wrote: >>> On Mon, Oct 31, 2016 at 11:25 AM, Emil Velikov >> gmail.com> wrote: On 31 October 2016 at 13:44, Rob Clark wrote: > From: Rob

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Emil Velikov
On 31 October 2016 at 16:39, Rob Clark wrote: > On Mon, Oct 31, 2016 at 11:25 AM, Emil Velikov > wrote: >> On 31 October 2016 at 13:44, Rob Clark wrote: >>> From: Rob Clark >>> >>> Rather than cut/pasting these couple ioctl wrappers everywhere, just >>> stuff them as static-inline into a

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Emil Velikov
On 31 October 2016 at 13:44, Rob Clark wrote: > From: Rob Clark > > Rather than cut/pasting these couple ioctl wrappers everywhere, just > stuff them as static-inline into a header. > > Signed-off-by: Rob Clark > --- > This is probably mostly used from mesa, but some drivers, test apps, etc >

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Chris Wilson
On Mon, Oct 31, 2016 at 10:57:16AM -0400, Rob Clark wrote: > On Mon, Oct 31, 2016 at 10:38 AM, Chris Wilson > wrote: > > Which discards the synchronisation on the new fence if there's an error, > > are we meant to flag a GL_ERROR? > > The error checking should already be done at the egl level.

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Chris Wilson
On Mon, Oct 31, 2016 at 10:30:23AM -0400, Rob Clark wrote: > On Mon, Oct 31, 2016 at 9:55 AM, Chris Wilson > wrote: > > What I liked was doing > > > > if (fd2 < 0) > > return dup(fd1); > > > > if (fd1 < 0) > > return dup(fd2); > > > > That makes accumulating the fences in the

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Chris Wilson
On Mon, Oct 31, 2016 at 09:44:07AM -0400, Rob Clark wrote: > From: Rob Clark > > Rather than cut/pasting these couple ioctl wrappers everywhere, just > stuff them as static-inline into a header. > > Signed-off-by: Rob Clark > --- > This is probably mostly used from mesa, but some drivers, test

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 1:15 PM, Emil Velikov wrote: > On 31 October 2016 at 16:39, Rob Clark wrote: >> On Mon, Oct 31, 2016 at 11:25 AM, Emil Velikov >> wrote: >>> On 31 October 2016 at 13:44, Rob Clark wrote: From: Rob Clark Rather than cut/pasting these couple ioctl

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Gustavo Padovan
2016-10-31 Rob Clark : > On Mon, Oct 31, 2016 at 9:55 AM, Chris Wilson > wrote: > > On Mon, Oct 31, 2016 at 09:44:07AM -0400, Rob Clark wrote: > >> From: Rob Clark > >> > >> Rather than cut/pasting these couple ioctl wrappers everywhere, just > >> stuff them as static-inline into a header. >

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 11:25 AM, Emil Velikov wrote: > On 31 October 2016 at 13:44, Rob Clark wrote: >> From: Rob Clark >> >> Rather than cut/pasting these couple ioctl wrappers everywhere, just >> stuff them as static-inline into a header. >> >> Signed-off-by: Rob Clark >> --- >> This is

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 11:15 AM, Chris Wilson wrote: > On Mon, Oct 31, 2016 at 10:57:16AM -0400, Rob Clark wrote: >> On Mon, Oct 31, 2016 at 10:38 AM, Chris Wilson >> wrote: >> > Which discards the synchronisation on the new fence if there's an error, >> > are we meant to flag a GL_ERROR? >>

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 10:38 AM, Chris Wilson wrote: > On Mon, Oct 31, 2016 at 10:30:23AM -0400, Rob Clark wrote: >> On Mon, Oct 31, 2016 at 9:55 AM, Chris Wilson >> wrote: >> > What I liked was doing >> > >> > if (fd2 < 0) >> > return dup(fd1); >> > >> > if (fd1 < 0) >> >

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 9:55 AM, Chris Wilson wrote: > On Mon, Oct 31, 2016 at 09:44:07AM -0400, Rob Clark wrote: >> From: Rob Clark >> >> Rather than cut/pasting these couple ioctl wrappers everywhere, just >> stuff them as static-inline into a header. >> >> Signed-off-by: Rob Clark >> --- >>

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
On Mon, Oct 31, 2016 at 9:55 AM, Chris Wilson wrote: > On Mon, Oct 31, 2016 at 09:44:07AM -0400, Rob Clark wrote: >> From: Rob Clark >> >> Rather than cut/pasting these couple ioctl wrappers everywhere, just >> stuff them as static-inline into a header. >> >> Signed-off-by: Rob Clark >> --- >>

[PATCH libdrm] add libsync.h helper

2016-10-31 Thread Rob Clark
From: Rob Clark Rather than cut/pasting these couple ioctl wrappers everywhere, just stuff them as static-inline into a header. Signed-off-by: Rob Clark --- This is probably mostly used from mesa, but some drivers, test apps, etc may also want to use it from libdrm.