One less hack!
When Collabora's Gustavo Padovan's sync_file work, which is properly up-streaming Android's Sync/fence functionality, first landed upstream in 4.6-rc it caused some trouble for the mainline Nexus7 setup. This is because to properly get it upstream, the ABI needed to be tweaked, which means the existing libsync userspace code stopped working.
So since then, I've taken the cheap way out and just reverted those changes in mass to preserve the old ABI, and "look into it" has been on my todo.
But no more! Thanks to Gustavo, who after doing the heavy lifting on the the kernel side, also implemented fixes for Android's libsync logic as well!:https://git.collabora.com/cgit/user/padovan/android-system-core.git/log/
I've just integrated this into the Nexus7 build, and it seems to be working great:https://wiki.linaro.org/LMG/Kernel/FormFactorEnablement
(if you already have that build env set up, make sure you update the local manifest tree before resyncing)
Big thanks also to +Rob Herring
who pointed me to Gustavo's work and had already sorted out some permission/integration issues for his generic multi-device Android build (and I feel like half my posts are about me doing something Rob has already done. :)