dma-fence & android sync

This proposal has been accepted as a session.

*

One Line Summary

explicit synchronization in the android graphics layers and mainlining efforts

Abstract

“Modern Android devices have a userspace layer known as the Hardware Composer HAL (HWC) that’s responsible for abstracting away the per-SoC logic for doing display composition of graphics buffers, and feeding the results to display. HWC can also pull data from media IP blocks, like camera or video decode/encode, and use them for composition. In order to exploit parallelism between this hardware, SoC vendors often implemented implicit synchronization contracts between drivers/hardware that made systems very difficult to debug or reason about, and were often flat out wrong. Android sync is a framework for explicit synchronization, so that drivers and hardware can safely and performantly synchronize with one another through a unified interface.

The canonical usage of sync is between graphics and display. A GPU driver can kick off work for generating a graphics buffer, and before this work is complete and the buffer finished, create a “sync pt” file descriptor to track this work. Userspace software can now hand off this graphics buffer and “sync pt” to a display driver, which can begin spooling up the next frame for display – before the GPU block has finished with the buffer. This deferred synchronization reduces latency, and depending on the platform, allows drivers to exploit hardware synchronization. Android sync also has strong facilities for debugging, which can greatly aid in figuring out the deadlocks and race-conditions which often appear in these data pipelines."

Tags

GPU, android, sync, dma-fence

Presentation Materials

slides

Speaker