[Mesa-dev] [Bug 101655] Explicit sync support for android
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Fri Jun 30 04:14:36 UTC 2017
https://bugs.freedesktop.org/show_bug.cgi?id=101655
Bug ID: 101655
Summary: Explicit sync support for android
Product: Mesa
Version: 17.1
Hardware: Other
OS: other
Status: NEW
Severity: normal
Priority: medium
Component: EGL
Assignee: mesa-dev at lists.freedesktop.org
Reporter: yogesh.marathe at intel.com
QA Contact: mesa-dev at lists.freedesktop.org
Description: The explicit sync was introduced in android to have sync fds
passed between user space processes and let user insert waits for buffer
transcations as appropriate. In android, if there is a producer-consumer
scenario in framework and if mesa is being used underneath this explicit sync
wouldn't work because the fence_fd is being forced to -1 before enqueue. The
comments above this assignment clearly state why its doing so, although it
seems old and assumes that consumer will never want use that fd to get a signal
timestamp using libsync apis or wait on that fd. Acquire fence on consumer side
remains always invalid due to this.
File: platform_android.c
Function: droid_window_enqueue_buffer()
...
int fence_fd = -1;
dri2_surf->window->queueBuffer(dri2_surf->window, dri2_surf->buffer,
fence_fd);
...
Test case: flatland - provided though aosp under
framworks/native/cmds/flatland is an app that tests explicit functionality on
android.
Symptoms and Cause: flatland hangs because it tries to do getSignalTime() for
this acquire fence_fd on consumer side and uses that to calculate time elapsed
for doing one frame of particular resolution.
Expectations:
1. Flatland should work as standalone test case with mesa.
2. To support explicit sync, it should forward a valid fence for a buffer being
enqueued (it can also be a signaled one if buffer is immediately available for
consumption).
I tried, if a sync fence can be created before buffer is enqueued but didnt
find a way because all sync functions seem to be static in nature and exposed
only though egl apis. I don't know if there is any other way to call those
functions (e.g. dri2_create_sync etc.) from platform_android.c directly.
--
You are receiving this mail because:
You are the assignee for the bug.
You are the QA Contact for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20170630/e4e61d0f/attachment.html>
More information about the mesa-dev
mailing list