2016-06-21 05:49:02 -06:00
|
|
|
=============================
|
|
|
|
Mode Setting Helper Functions
|
|
|
|
=============================
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
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
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
|
2017-03-02 08:16:36 -07:00
|
|
|
:doc: overview
|
2016-08-12 14:48:38 -06:00
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_modeset_helper_vtables.h
|
2017-03-02 08:16:36 -07:00
|
|
|
:internal:
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2017-03-02 08:16:38 -07:00
|
|
|
.. _drm_atomic_helper:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
Atomic Modeset Helper Functions Reference
|
|
|
|
=========================================
|
|
|
|
|
|
|
|
Overview
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
Implementing Asynchronous Atomic Commit
|
|
|
|
---------------------------------------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
|
|
|
|
:doc: implementing nonblocking commit
|
|
|
|
|
|
|
|
Atomic State Reset and Initialization
|
|
|
|
-------------------------------------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
|
|
|
|
:doc: atomic state reset and initialization
|
|
|
|
|
2016-11-21 10:18:02 -07:00
|
|
|
Helper Functions Reference
|
|
|
|
--------------------------
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_atomic_helper.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_atomic_helper.c
|
|
|
|
:export:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
Simple KMS Helper Reference
|
|
|
|
===========================
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2017-03-02 08:16:36 -07:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
|
|
|
|
:doc: overview
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_simple_kms_helper.h
|
|
|
|
:internal:
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_simple_kms_helper.c
|
2016-06-21 05:49:02 -06:00
|
|
|
:export:
|
|
|
|
|
|
|
|
fbdev Helper Functions Reference
|
|
|
|
================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
|
|
|
|
:doc: fbdev helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_fb_helper.h
|
|
|
|
:internal:
|
|
|
|
|
2017-03-02 08:16:36 -07:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_fb_helper.c
|
|
|
|
:export:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
Framebuffer CMA Helper Functions Reference
|
|
|
|
==========================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
|
|
|
|
:doc: framebuffer cma helper functions
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_fb_cma_helper.c
|
|
|
|
:export:
|
|
|
|
|
2017-03-02 08:16:35 -07:00
|
|
|
.. _drm_bridges:
|
|
|
|
|
2018-07-09 02:40:13 -06:00
|
|
|
Framebuffer GEM Helper Reference
|
|
|
|
================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_gem_framebuffer_helper.c
|
|
|
|
:export:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
Bridges
|
|
|
|
=======
|
|
|
|
|
|
|
|
Overview
|
|
|
|
--------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
Default bridge callback sequence
|
|
|
|
--------------------------------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
|
|
|
|
:doc: bridge callbacks
|
|
|
|
|
2016-08-31 10:09:05 -06:00
|
|
|
|
|
|
|
Bridge Helper Reference
|
|
|
|
-------------------------
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_bridge.h
|
|
|
|
:internal:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_bridge.c
|
|
|
|
:export:
|
|
|
|
|
2017-06-02 14:25:14 -06:00
|
|
|
Panel-Bridge Helper Reference
|
|
|
|
-----------------------------
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/bridge/panel.c
|
|
|
|
:export:
|
|
|
|
|
2017-03-02 08:16:35 -07:00
|
|
|
.. _drm_panel_helper:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
Panel Helper Reference
|
|
|
|
======================
|
|
|
|
|
2017-03-02 08:16:36 -07:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_panel.c
|
|
|
|
:doc: drm panel
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_panel.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_panel.c
|
|
|
|
:export:
|
|
|
|
|
2017-11-25 12:35:48 -07:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_panel_orientation_quirks.c
|
|
|
|
:export:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
Display Port Helper Functions Reference
|
|
|
|
=======================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
|
|
|
|
:doc: dp helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_dp_helper.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_helper.c
|
|
|
|
:export:
|
|
|
|
|
2018-07-11 07:29:08 -06:00
|
|
|
Display Port CEC Helper Functions Reference
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
|
|
|
|
:doc: dp cec helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_cec.c
|
|
|
|
:export:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
Display Port Dual Mode Adaptor Helper Functions Reference
|
|
|
|
=========================================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
|
|
|
|
:doc: dp dual mode helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_dp_dual_mode_helper.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_dual_mode_helper.c
|
|
|
|
:export:
|
|
|
|
|
|
|
|
Display Port MST Helper Functions Reference
|
|
|
|
===========================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
|
|
|
|
:doc: dp mst helper
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_dp_mst_helper.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_dp_mst_topology.c
|
|
|
|
:export:
|
|
|
|
|
|
|
|
MIPI DSI Helper Functions Reference
|
|
|
|
===================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
|
|
|
|
:doc: dsi helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_mipi_dsi.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_mipi_dsi.c
|
|
|
|
:export:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
Output Probing Helper Functions Reference
|
|
|
|
=========================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
|
|
|
|
:doc: output probing helper overview
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_probe_helper.c
|
|
|
|
:export:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
EDID Helper Functions Reference
|
|
|
|
===============================
|
|
|
|
|
2016-08-31 10:09:06 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_edid.h
|
|
|
|
:internal:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_edid.c
|
|
|
|
:export:
|
|
|
|
|
2017-03-13 05:23:59 -06:00
|
|
|
SCDC Helper Functions Reference
|
|
|
|
===============================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
|
|
|
|
:doc: scdc helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_scdc_helper.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_scdc_helper.c
|
|
|
|
:export:
|
|
|
|
|
2016-06-21 05:49:02 -06:00
|
|
|
Rectangle Utilities Reference
|
|
|
|
=============================
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_rect.h
|
|
|
|
:doc: rect utils
|
|
|
|
|
|
|
|
.. kernel-doc:: include/drm/drm_rect.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_rect.c
|
|
|
|
:export:
|
|
|
|
|
|
|
|
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.
|
|
|
|
|
|
|
|
.. kernel-doc:: include/linux/hdmi.h
|
|
|
|
:internal:
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/video/hdmi.c
|
|
|
|
:export:
|
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
Flip-work Helper Reference
|
|
|
|
==========================
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_flip_work.h
|
|
|
|
:doc: flip utils
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: include/drm/drm_flip_work.h
|
|
|
|
:internal:
|
2016-06-21 05:49:02 -06:00
|
|
|
|
2016-08-12 14:48:38 -06:00
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_flip_work.c
|
2016-06-21 05:49:02 -06:00
|
|
|
:export:
|
|
|
|
|
2016-08-12 14:48:39 -06:00
|
|
|
Auxiliary Modeset Helpers
|
|
|
|
=========================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
|
|
|
|
:doc: aux kms helpers
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_modeset_helper.c
|
|
|
|
:export:
|
2017-08-13 07:31:44 -06:00
|
|
|
|
2018-07-09 02:40:14 -06:00
|
|
|
OF/DT Helpers
|
|
|
|
=============
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_of.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_of.c
|
|
|
|
:export:
|
|
|
|
|
2017-12-14 13:30:54 -07:00
|
|
|
Legacy Plane Helper Reference
|
|
|
|
=============================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_plane_helper.c
|
|
|
|
:export:
|
|
|
|
|
|
|
|
Legacy CRTC/Modeset Helper Functions Reference
|
|
|
|
==============================================
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
|
|
|
|
:doc: overview
|
|
|
|
|
|
|
|
.. kernel-doc:: drivers/gpu/drm/drm_crtc_helper.c
|
|
|
|
:export:
|