summaryrefslogtreecommitdiff
path: root/include/drm/drm_connector.h
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>2019-06-11 23:51:43 +0300
committerSean Paul <seanpaul@chromium.org>2019-06-13 20:00:29 +0300
commit1b27fbdde1df172dba604855c45078d741f8c858 (patch)
tree95c0b071eda0eb46e4593c1f5c1e935e60ca7f9c /include/drm/drm_connector.h
parent43c76d72ea853ccaeb22a497c13d3cd946869ec6 (diff)
downloadlinux-1b27fbdde1df172dba604855c45078d741f8c858.tar.xz
drm: Add drm_atomic_get_(old|new)_connector_for_encoder() helpers
Add functions to the atomic core to retrieve the old and new connectors associated with an encoder in a drm_atomic_state. This is useful for encoders and bridges that need to access the connector, for instance for the drm_display_info. The CRTC associated with the encoder can also be retrieved through the connector state, and from it, the old and new CRTC states. Changed in v4: - Added to the set Changed in v5: - Fix up docbook (Daniel & Laurent) Changed in v6: - Updated commit subject (Sam) Link to v4: https://patchwork.freedesktop.org/patch/msgid/20190508160920.144739-3-sean@poorly.run Link to v5: https://patchwork.freedesktop.org/patch/msgid/20190611160844.257498-3-sean@poorly.run Cc: Daniel Vetter <daniel@ffwll.ch> Cc: Sam Ravnborg <sam@ravnborg.org> Tested-by: Heiko Stuebner <heiko@sntech.de> Reviewed-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> [seanpaul removed WARNs from helpers and added docs to explain why returning NULL might be valid] Signed-off-by: Sean Paul <seanpaul@chromium.org> Link: https://patchwork.freedesktop.org/patch/msgid/20190611205147.181298-1-sean@poorly.run
Diffstat (limited to 'include/drm/drm_connector.h')
-rw-r--r--include/drm/drm_connector.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 47e749b74e5f..071143bc0ebd 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -518,6 +518,11 @@ struct drm_connector_state {
* &drm_connector_helper_funcs.atomic_best_encoder or
* &drm_connector_helper_funcs.best_encoder callbacks.
*
+ * This is also used in the atomic helpers to map encoders to their
+ * current and previous connectors, see
+ * &drm_atomic_get_old_connector_for_encoder() and
+ * &drm_atomic_get_new_connector_for_encoder().
+ *
* NOTE: Atomic drivers must fill this out (either themselves or through
* helpers), for otherwise the GETCONNECTOR and GETENCODER IOCTLs will
* not return correct data to userspace.