The code here is responsible for driving the display engine hardware in the systems supported by Fuchsia.
The Display hardware overview document introduces many terms needed to understand display code, and is a good background reading.
The Display configuration states document covers some important terms used throughout the stack.
The official entry point to the display driver stack is the fuchsia.hardware.display/Coordinator
FIDL interface. This FIDL interface will eventually become a part of the Fuchsia System Interface, and will be covered by ABI stability guarantees.
The interface's consumers are called display clients. This is a reference to the fact that consumers use FIDL clients for the Coordinator interface.
This interface is currently only exposed inside the Fuchsia platform source tree. The existing consumers of the interface are Scenic, virtcon, and the recovery UI. The last two consumers use the Carnelian library. There are no plans of supporting any new consumers.
The Display Coordinator maintains the state needed to multiplex the display engine hardware across multiple display clients. The Coordinator's design aims to allow for multiple display clients and multiple display engine drivers. This goal was sacrificed in a few places, in the name of expediency.
Whenever possible, data processing is implemented in the Coordinator, reducing the implementation complexity of hardware-specific display drivers. For example, the Coordinator performs all the hardware-independent validation of the layer configurations received from display clients, before passing the configurations to the display engine drivers.
The Coordinator implements the fuchsia.hardware.display/Coordinator
FIDL interface, described above, to serve requests from display clients such as Scenic.
The Display Coordinator is currently implemented as the coordinator
driver in the Fuchsia platform source tree. The fuchsia.hardware.display/Coordinator
FIDL interface is currently served under the display-coordinator
class in devfs
.
The Coordinator uses the fuchsia.hardware.display.engine/Engine
FIDL interface to communicate with hardware-specific display drivers. This FIDL interface will soon become a part of the Fuchsia System Interface, and will be covered by API stability guarantees.
Display engine drivers contain hardware-specific logic for driving a display engine.
Display engine drivers are currently built on top of DFv2 (Driver Framework v2). Drivers communicate with the Driver Framework via the DFv2 (Driver Framework v2) FIDL interface.
Many display engine drivers interface with the Display Coordinator using the api-protocols and api-types libraries. These libraries are ergonomic wrappers for proxies generated from the FIDL interface mentioned above.
Most display engine drivers were initially built on top of DFv1 and migrated to DFv2. The DFv1 legacy may show up in the drivers' structure, variable names, or comments. We consider this to be technical debt that causes cognitive overhead, and we aim to clean it up.
We aim to have the display driver stack closely follow all applicable style guides. We see unnecessary variations as a source of complexity.
The following list aims to include all the style guides referenced in our code reviews.