aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Ser2021-06-09 21:24:10 +0000
committerSimon Ser2021-08-02 09:34:38 +0200
commit33e1fc062456f43f17e5240d6e9be11e95ef5103 (patch)
tree5e8c0bc2f170fb8e68d66b69dd33e97539b52c17
parent6c9bd4432b252765b38bfc0bbe4847f43604f06e (diff)
drm/connector: add ref to drm_connector_get in iter docs
Mention that connectors need to be referenced manually if they are to be accessed after the iteration has progressed or ended. Signed-off-by: Simon Ser <contact@emersion.fr> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Link: https://patchwork.freedesktop.org/patch/msgid/KRoUI7OC9lRIvk3YzdGm6tcMVAVlG1fR78Ll7kTZZT4@cp3-web-051.plabs.ch
-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 0a1d9a0fcbb2..1647960c9e50 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1740,6 +1740,11 @@ void drm_mode_put_tile_group(struct drm_device *dev,
* drm_connector_list_iter_begin(), drm_connector_list_iter_end() and
* drm_connector_list_iter_next() respectively the convenience macro
* drm_for_each_connector_iter().
+ *
+ * Note that the return value of drm_connector_list_iter_next() is only valid
+ * up to the next drm_connector_list_iter_next() or
+ * drm_connector_list_iter_end() call. If you want to use the connector later,
+ * then you need to grab your own reference first using drm_connector_get().
*/
struct drm_connector_list_iter {
/* private: */