intel-gfx.lists.freedesktop.org archive mirror
 help / color / mirror / Atom feed
* Re: [Intel-gfx] [PATCH v2 7/7] drm/connector: add ref to drm_connector_get in iter docs
@ 2021-08-02  7:36 Simon Ser
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Ser @ 2021-08-02  7:36 UTC (permalink / raw)
  To: dri-devel, amd-gfx
  Cc: harry.wentland, alexander.deucher, michel, pekka.paalanen,
	daniel, daniel, intel-gfx

Pushed this one doc patch with Daniel's R-b on IRC.

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Intel-gfx] [PATCH v2 7/7] drm/connector: add ref to drm_connector_get in iter docs
@ 2021-06-09 21:24 Simon Ser
  0 siblings, 0 replies; 2+ messages in thread
From: Simon Ser @ 2021-06-09 21:24 UTC (permalink / raw)
  To: dri-devel, amd-gfx
  Cc: pekka.paalanen, michel, alexander.deucher, harry.wentland, intel-gfx

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>
---
 include/drm/drm_connector.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/include/drm/drm_connector.h b/include/drm/drm_connector.h
index 714d1a01c065..c1af1e4ca560 100644
--- a/include/drm/drm_connector.h
+++ b/include/drm/drm_connector.h
@@ -1735,6 +1735,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: */
-- 
2.31.1


_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-08-02  7:36 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-02  7:36 [Intel-gfx] [PATCH v2 7/7] drm/connector: add ref to drm_connector_get in iter docs Simon Ser
  -- strict thread matches above, loose matches on Subject: below --
2021-06-09 21:24 Simon Ser

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).