drm-kms-helpers.rst 10.1 KB

Mode Setting Helper Functions

The DRM subsystem aims for a strong separation between core code and helper libraries. Core code takes care of general setup and teardown and decoding userspace requests to kernel internal objects. Everything else is handled by a large set of helper libraries, which can be combined freely to pick and choose for each driver what fits, and avoid shared code where special behaviour is needed.

This distinction between core code and helpers is especially strong in the modesetting code, where there's a shared userspace ABI for all drivers. This is in contrast to the render side, where pretty much everything (with very few exceptions) can be considered optional helper code.

There are a few areas these helpers can grouped into:

  • Helpers to implement modesetting. The important ones here are the atomic helpers. Old drivers still often use the legacy CRTC helpers. They both share the same set of common helper vtables. For really simple drivers (anything that would have been a great fit in the deprecated fbdev subsystem) there's also the simple display pipe helpers.
  • There's a big pile of helpers for handling outputs. First the generic bridge helpers for handling encoder and transcoder IP blocks. Second the panel helpers for handling panel-related information and logic. Plus then a big set of helpers for the various sink standards (DisplayPort, HDMI, MIPI DSI). Finally there's also generic helpers for handling output probing, and for dealing with EDIDs.
  • The last group of helpers concerns itself with the frontend side of a display pipeline: Planes, handling rectangles for visibility checking and scissoring, flip queues and assorted bits.

Modeset Helper Reference for Common Vtables

Atomic Modeset Helper Functions Reference

Overview

Implementing Asynchronous Atomic Commit

Helper Functions Reference

Atomic State Reset and Initialization

Atomic State Helper Reference

Simple KMS Helper Reference

fbdev Helper Functions Reference

format Helper Functions Reference

Framebuffer CMA Helper Functions Reference

Framebuffer GEM Helper Reference

Bridges

Overview

Bridge Operations

Bridge Connector Helper

Bridge Helper Reference

Bridge Connector Helper Reference

Panel-Bridge Helper Reference

Panel Helper Reference

Panel Self Refresh Helper Reference

HDCP Helper Functions Reference

Display Port Helper Functions Reference

Display Port CEC Helper Functions Reference

Display Port Dual Mode Adaptor Helper Functions Reference

Display Port MST Helpers

Overview

Functions Reference

Topology Lifetime Internals

These functions aren't exported to drivers, but are documented here to help make the MST topology helpers easier to understand

MIPI DBI Helper Functions Reference

MIPI DSI Helper Functions Reference

Display Stream Compression Helper Functions Reference

Output Probing Helper Functions Reference

EDID Helper Functions Reference

SCDC Helper Functions Reference

HDMI Infoframes Helper Reference

Strictly speaking this is not a DRM helper library but generally useable by any driver interfacing with HDMI outputs like v4l or alsa drivers. But it nicely fits into the overall topic of mode setting helper libraries and hence is also included here.

Rectangle Utilities Reference

Flip-work Helper Reference

Auxiliary Modeset Helpers

OF/DT Helpers

Legacy Plane Helper Reference

Legacy CRTC/Modeset Helper Functions Reference