Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On 2016-10-13 04:37 PM, Rafael Antognolli wrote: Hi all, On Tue, Oct 11, 2016 at 01:47:37PM -0400, Robert Foss wrote: On 2016-10-11 01:37 PM, Chad Versace wrote: On Tue 11 Oct 2016, Emil Velikov wrote: On 10 October 2016 at 20:41, Rob Clarkwrote: On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace wrote: Testing: I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, but the series does build. I just wanted to get these patches on the list as a status-update. I'm slowly working on getting Rob Clark's hacked-up kmscube to work on this series. I did test that this series doesn't break any dEQP-EGL sync tests. But my dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. From a quick skim neither one of CTS/dEQP/piglit had EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that adding a few piglits might be a good idea. It would be good to coordinate to avoid writing the same tests twice ;-) Yes, we should have tests before committing this feature. I am releasing any lock I may had held on test writing, as I don't have time to tackle that this week. Writing the tests is not on my table at the moment. Perhaps some time can be scraped together for it at a later point, but not now. If nobody has started writing piglit tests yet, and it's OK with you guys, I would like to give it a try since I'm also interested in this feature. Also if I understood correctly, the initial thing to test is whether WaitSync and ClientWaitSync respect input fences, right? I'll try to come up with a list of other things to test, like invalid fences and so on, but if you guys already have a list of things to test in mind, please let me know. Anyway, is it fine if I start working on this? That would be very welcome! ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On Thu, Oct 13, 2016 at 4:37 PM, Rafael Antognolliwrote: > Hi all, > > On Tue, Oct 11, 2016 at 01:47:37PM -0400, Robert Foss wrote: >> >> >> On 2016-10-11 01:37 PM, Chad Versace wrote: >> > On Tue 11 Oct 2016, Emil Velikov wrote: >> > > On 10 October 2016 at 20:41, Rob Clark wrote: >> > > > On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace >> > > > wrote: >> > >> > > > > Testing: >> > > > > >> > > > > I haven't yet tested EGL_ANDROID_native_fence_sync with these >> > > > > patches, but >> > > > > the series does build. I just wanted to get these patches on the >> > > > > list as a >> > > > > status-update. I'm slowly working on getting Rob Clark's >> > > > > hacked-up kmscube to >> > > > > work on this series. >> > > > > >> > > > > I did test that this series doesn't break any dEQP-EGL sync >> > > > > tests. But my >> > > > > dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. >> > > > > >> > >> > > From a quick skim neither one of CTS/dEQP/piglit had >> > > EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that >> > > adding a few piglits might be a good idea. It would be good to >> > > coordinate to avoid writing the same tests twice ;-) >> > >> > Yes, we should have tests before committing this feature. I am releasing >> > any lock I may had held on test writing, as I don't have time to tackle >> > that this week. >> >> Writing the tests is not on my table at the moment. Perhaps some time can be >> scraped together for it at a later point, but not now. > > If nobody has started writing piglit tests yet, and it's OK with you > guys, I would like to give it a try since I'm also interested in this > feature. that would be hugely useful.. I'm not sure anyone else has started on tests, but they are definitely needed > Also if I understood correctly, the initial thing to test is whether > WaitSync and ClientWaitSync respect input fences, right? I'll try to > come up with a list of other things to test, like invalid fences and so > on, but if you guys already have a list of things to test in mind, > please let me know. I guess API level tests, like can you create a fence w/ NO_NATIVE_FENCE_FD as input, then glFlush(), and then get an fd back from eglDupFenceFD(), and that sort of thing? I haven't really given it much thought yet. BR, -R > Anyway, is it fine if I start working on this? > > Regards, > Rafael ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
Hi all, On Tue, Oct 11, 2016 at 01:47:37PM -0400, Robert Foss wrote: > > > On 2016-10-11 01:37 PM, Chad Versace wrote: > > On Tue 11 Oct 2016, Emil Velikov wrote: > > > On 10 October 2016 at 20:41, Rob Clarkwrote: > > > > On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace > > > > wrote: > > > > > > > Testing: > > > > > > > > > > I haven't yet tested EGL_ANDROID_native_fence_sync with these > > > > > patches, but > > > > > the series does build. I just wanted to get these patches on the > > > > > list as a > > > > > status-update. I'm slowly working on getting Rob Clark's > > > > > hacked-up kmscube to > > > > > work on this series. > > > > > > > > > > I did test that this series doesn't break any dEQP-EGL sync > > > > > tests. But my > > > > > dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. > > > > > > > > > > From a quick skim neither one of CTS/dEQP/piglit had > > > EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that > > > adding a few piglits might be a good idea. It would be good to > > > coordinate to avoid writing the same tests twice ;-) > > > > Yes, we should have tests before committing this feature. I am releasing > > any lock I may had held on test writing, as I don't have time to tackle > > that this week. > > Writing the tests is not on my table at the moment. Perhaps some time can be > scraped together for it at a later point, but not now. If nobody has started writing piglit tests yet, and it's OK with you guys, I would like to give it a try since I'm also interested in this feature. Also if I understood correctly, the initial thing to test is whether WaitSync and ClientWaitSync respect input fences, right? I'll try to come up with a list of other things to test, like invalid fences and so on, but if you guys already have a list of things to test in mind, please let me know. Anyway, is it fine if I start working on this? Regards, Rafael ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On 2016-10-11 01:37 PM, Chad Versace wrote: On Tue 11 Oct 2016, Emil Velikov wrote: On 10 October 2016 at 20:41, Rob Clarkwrote: On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace wrote: Testing: I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, but the series does build. I just wanted to get these patches on the list as a status-update. I'm slowly working on getting Rob Clark's hacked-up kmscube to work on this series. I did test that this series doesn't break any dEQP-EGL sync tests. But my dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. From a quick skim neither one of CTS/dEQP/piglit had EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that adding a few piglits might be a good idea. It would be good to coordinate to avoid writing the same tests twice ;-) Yes, we should have tests before committing this feature. I am releasing any lock I may had held on test writing, as I don't have time to tackle that this week. Writing the tests is not on my table at the moment. Perhaps some time can be scraped together for it at a later point, but not now. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On Tue 11 Oct 2016, Emil Velikov wrote: > On 10 October 2016 at 20:41, Rob Clarkwrote: > > On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace > > wrote: > >> Testing: > >> > >> I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, > >> but > >> the series does build. I just wanted to get these patches on the list > >> as a > >> status-update. I'm slowly working on getting Rob Clark's hacked-up > >> kmscube to > >> work on this series. > >> > >> I did test that this series doesn't break any dEQP-EGL sync tests. But > >> my > >> dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. > >> > From a quick skim neither one of CTS/dEQP/piglit had > EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that > adding a few piglits might be a good idea. It would be good to > coordinate to avoid writing the same tests twice ;-) Yes, we should have tests before committing this feature. I am releasing any lock I may had held on test writing, as I don't have time to tackle that this week. ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On 10 October 2016 at 20:41, Rob Clarkwrote: > On Mon, Oct 10, 2016 at 1:43 PM, Chad Versace > wrote: >> Background: >> >> This extension is needed by Android (via ARC++) on Chrome OS. >> Essentially, this extension provides a translation between EGLSync and >> explicit cross-process synchronization points, represented as "sync >> fds". The relevant documentation is: >> >> [1]: >> https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt >> [2]: >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sync_file.txt?id=refs/tags/v4.7-rc6 >> [3]: >> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sync_file.h?id=refs/tags/v4.7-rc6 >> [4]: >> https://source.android.com/devices/graphics/index.html#synchronization_framework >> [5]: >> https://source.android.com/devices/graphics/implement.html#explicit_synchronization >> >> This series is only an RFC because the i915 kernel interface is not yet >> upstream. Here's the upstream status: >> >> - Core kernel support for sync files was merged into Linux 4.7. See >>[2] and [3] above. >> >> - Chris Wilson is actively working on the i915 interface. >> >> This series builds on some of Rob Clark's previous RFC patches, which >> are included here. Some of my patches make changes to Rob's or document >> open questions about Rob's; those patches are prefixed with either >> 'squash!' or 'todo!'. >> >> Testing: >> >> I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, >> but >> the series does build. I just wanted to get these patches on the list as >> a >> status-update. I'm slowly working on getting Rob Clark's hacked-up >> kmscube to >> work on this series. >> >> I did test that this series doesn't break any dEQP-EGL sync tests. But my >> dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. >> From a quick skim neither one of CTS/dEQP/piglit had EGL_ANDROID_native_fence_sync tests. I've mentioned to Rob F that adding a few piglits might be a good idea. It would be good to coordinate to avoid writing the same tests twice ;-) >> Branches: >> >> mesa: This exact patch series lives at >> http://cgit.kiwitree.net/~chadv/mesa/log/?h=review/fences-v02 >> >> mesa: My up-to-date, work-in-progress branch lives at >> http://cgit.kiwitree.net/~chadv/mesa/log/?h=wip/fences >> >> libdrm: If you want to build this, you also need my libdrm branch: >> http://cgit.kiwitree.net/~chadv/libdrm/log/?h=wip/fences > > btw, we might want a sync-fd ioctl wrapper somewhere.. I had stuck it > in libdrm (I might have needed it, or at least anticipated needing it > both in mesa and libdrm??) > > https://github.com/freedreno/libdrm/commit/03479dee4fcaa85a81ed67e5112613f866b55467 > > Also, I should mention that Robert Foss was debugging some issue w/ > this with drm/hwc2 on android. Not entirely sure if the problem was > with the virgl backend code, or something more core/shared.. it is > only doing something slightly differently from kmscube > (eglCreateSync(EGL_NO_NATIVE_FENCE_FD_ANDROID) followed by glFlush() > instead of eglSwapBuffers() before eglDupNativeFence()) I was going > to debug that over the weekend but atm kernel is a bit broken on the > boards I have so didn't get very far yet.. > Mildly related bug report + proposed fix: https://bugs.freedesktop.org/show_bug.cgi?id=98172 -Emil ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
Re: [Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
On Mon, Oct 10, 2016 at 1:43 PM, Chad Versacewrote: > Background: > > This extension is needed by Android (via ARC++) on Chrome OS. > Essentially, this extension provides a translation between EGLSync and > explicit cross-process synchronization points, represented as "sync > fds". The relevant documentation is: > > [1]: > https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt > [2]: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sync_file.txt?id=refs/tags/v4.7-rc6 > [3]: > https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sync_file.h?id=refs/tags/v4.7-rc6 > [4]: > https://source.android.com/devices/graphics/index.html#synchronization_framework > [5]: > https://source.android.com/devices/graphics/implement.html#explicit_synchronization > > This series is only an RFC because the i915 kernel interface is not yet > upstream. Here's the upstream status: > > - Core kernel support for sync files was merged into Linux 4.7. See >[2] and [3] above. > > - Chris Wilson is actively working on the i915 interface. > > This series builds on some of Rob Clark's previous RFC patches, which > are included here. Some of my patches make changes to Rob's or document > open questions about Rob's; those patches are prefixed with either > 'squash!' or 'todo!'. > > Testing: > > I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, but > the series does build. I just wanted to get these patches on the list as a > status-update. I'm slowly working on getting Rob Clark's hacked-up > kmscube to > work on this series. > > I did test that this series doesn't break any dEQP-EGL sync tests. But my > dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. > > Branches: > > mesa: This exact patch series lives at > http://cgit.kiwitree.net/~chadv/mesa/log/?h=review/fences-v02 > > mesa: My up-to-date, work-in-progress branch lives at > http://cgit.kiwitree.net/~chadv/mesa/log/?h=wip/fences > > libdrm: If you want to build this, you also need my libdrm branch: > http://cgit.kiwitree.net/~chadv/libdrm/log/?h=wip/fences btw, we might want a sync-fd ioctl wrapper somewhere.. I had stuck it in libdrm (I might have needed it, or at least anticipated needing it both in mesa and libdrm??) https://github.com/freedreno/libdrm/commit/03479dee4fcaa85a81ed67e5112613f866b55467 Also, I should mention that Robert Foss was debugging some issue w/ this with drm/hwc2 on android. Not entirely sure if the problem was with the virgl backend code, or something more core/shared.. it is only doing something slightly differently from kmscube (eglCreateSync(EGL_NO_NATIVE_FENCE_FD_ANDROID) followed by glFlush() instead of eglSwapBuffers() before eglDupNativeFence()) I was going to debug that over the weekend but atm kernel is a bit broken on the boards I have so didn't get very far yet.. BR, -R > kernel: I have a kernel branch too where I collect other people's > patches. Be warned: if you run it, it will eat your machine's soul. > http://cgit.kiwitree.net/~chadv/linux/log/?h=wip/fences > > Chad Versace (9): > squash! egl: add EGL_ANDROID_native_fence_sync > squash! egl: add EGL_ANDROID_native_fence_sync > squash! egl: add EGL_ANDROID_native_fence_sync > i965: Add intel_screen::has_fence_fd > i965: Add intel_batchbuffer_flush_fence() > i965/sync: Add brw_fence::type > i965/sync: Fail sync creation with batchbuffer flush fails > i965/sync: Rename brw_fence_insert() > i965/sync: Implement fences based on Linux sync_file > > Rob Clark (3): > egl: initialize SyncCondition after attr parsing > dri: extend fence extension to support native fd fences > egl: add EGL_ANDROID_native_fence_sync > > include/GL/internal/dri_interface.h | 44 +++- > src/egl/drivers/dri2/egl_dri2.c | 57 - > src/egl/main/eglapi.c | 38 +++- > src/egl/main/eglapi.h | 2 + > src/egl/main/egldisplay.h | 1 + > src/egl/main/eglfallbacks.c | 1 + > src/egl/main/eglsync.c| 44 ++-- > src/egl/main/eglsync.h| 1 + > src/mesa/drivers/dri/i965/brw_sync.c | 297 > ++ > src/mesa/drivers/dri/i965/intel_batchbuffer.c | 25 ++- > src/mesa/drivers/dri/i965/intel_batchbuffer.h | 14 +- > src/mesa/drivers/dri/i965/intel_screen.c | 3 + > src/mesa/drivers/dri/i965/intel_screen.h | 2 +- > 13 files changed, 456 insertions(+), 73 deletions(-) > > -- > 2.10.0 > ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev
[Mesa-dev] [RFC 00/12] egl, i965: Support EGL_ANDROID_native_fence_sync (v2)
Background: This extension is needed by Android (via ARC++) on Chrome OS. Essentially, this extension provides a translation between EGLSync and explicit cross-process synchronization points, represented as "sync fds". The relevant documentation is: [1]: https://www.khronos.org/registry/egl/extensions/ANDROID/EGL_ANDROID_native_fence_sync.txt [2]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/sync_file.txt?id=refs/tags/v4.7-rc6 [3]: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/include/uapi/linux/sync_file.h?id=refs/tags/v4.7-rc6 [4]: https://source.android.com/devices/graphics/index.html#synchronization_framework [5]: https://source.android.com/devices/graphics/implement.html#explicit_synchronization This series is only an RFC because the i915 kernel interface is not yet upstream. Here's the upstream status: - Core kernel support for sync files was merged into Linux 4.7. See [2] and [3] above. - Chris Wilson is actively working on the i915 interface. This series builds on some of Rob Clark's previous RFC patches, which are included here. Some of my patches make changes to Rob's or document open questions about Rob's; those patches are prefixed with either 'squash!' or 'todo!'. Testing: I haven't yet tested EGL_ANDROID_native_fence_sync with these patches, but the series does build. I just wanted to get these patches on the list as a status-update. I'm slowly working on getting Rob Clark's hacked-up kmscube to work on this series. I did test that this series doesn't break any dEQP-EGL sync tests. But my dEQP doesn't include any EGL_ANDROID_native_fence_sync tests. Branches: mesa: This exact patch series lives at http://cgit.kiwitree.net/~chadv/mesa/log/?h=review/fences-v02 mesa: My up-to-date, work-in-progress branch lives at http://cgit.kiwitree.net/~chadv/mesa/log/?h=wip/fences libdrm: If you want to build this, you also need my libdrm branch: http://cgit.kiwitree.net/~chadv/libdrm/log/?h=wip/fences kernel: I have a kernel branch too where I collect other people's patches. Be warned: if you run it, it will eat your machine's soul. http://cgit.kiwitree.net/~chadv/linux/log/?h=wip/fences Chad Versace (9): squash! egl: add EGL_ANDROID_native_fence_sync squash! egl: add EGL_ANDROID_native_fence_sync squash! egl: add EGL_ANDROID_native_fence_sync i965: Add intel_screen::has_fence_fd i965: Add intel_batchbuffer_flush_fence() i965/sync: Add brw_fence::type i965/sync: Fail sync creation with batchbuffer flush fails i965/sync: Rename brw_fence_insert() i965/sync: Implement fences based on Linux sync_file Rob Clark (3): egl: initialize SyncCondition after attr parsing dri: extend fence extension to support native fd fences egl: add EGL_ANDROID_native_fence_sync include/GL/internal/dri_interface.h | 44 +++- src/egl/drivers/dri2/egl_dri2.c | 57 - src/egl/main/eglapi.c | 38 +++- src/egl/main/eglapi.h | 2 + src/egl/main/egldisplay.h | 1 + src/egl/main/eglfallbacks.c | 1 + src/egl/main/eglsync.c| 44 ++-- src/egl/main/eglsync.h| 1 + src/mesa/drivers/dri/i965/brw_sync.c | 297 ++ src/mesa/drivers/dri/i965/intel_batchbuffer.c | 25 ++- src/mesa/drivers/dri/i965/intel_batchbuffer.h | 14 +- src/mesa/drivers/dri/i965/intel_screen.c | 3 + src/mesa/drivers/dri/i965/intel_screen.h | 2 +- 13 files changed, 456 insertions(+), 73 deletions(-) -- 2.10.0 ___ mesa-dev mailing list mesa-dev@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/mesa-dev