Skip to contentSkip to conversation

drm/gem: Tiny kernel clarification for drm_gem_fence_array_add

PATCH In review Daniel Vetter 2 participants 2 messages May 21, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drm/gem: Tiny kernel clarification for drm_gem_fence_array_add

Spotted while trying to convert panfrost to these.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
---
 drivers/gpu/drm/drm_gem.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_gem.c +3 -0
index 9989425e9875..e5dc98425896 100644
@@ -1312,6 +1312,9 @@ EXPORT_SYMBOL(drm_gem_unlock_reservations);
  * @fence_array: array of dma_fence * for the job to block on.
  * @fence: the dma_fence to add to the list of dependencies.
  *
+ * This functions consumes the reference for @fence both on success and error
+ * cases.
+ *
  * Returns:
  * 0 on success, or an error on failing to expand the array.
  */
Signature · 1 line
2.31.0
#1 lore raw
Quoted 8 lines · Daniel Vetter

Spotted while trying to convert panfrost to these.

Cc Maarten Lankhorst <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Thomas Zimmermann <[email protected]>
Cc David Airlie <[email protected]>
Cc Daniel Vetter <[email protected]>
Cc Emma Anholt <[email protected]>

As original author of these.
-Daniel

Quoted 21 lines
---
 drivers/gpu/drm/drm_gem.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/gpu/drm/drm_gem.c +3 -0
index 9989425e9875..e5dc98425896 100644
@@ -1312,6 +1312,9 @@ EXPORT_SYMBOL(drm_gem_unlock_reservations);
  * @fence_array: array of dma_fence * for the job to block on.
  * @fence: the dma_fence to add to the list of dependencies.
  *
+ * This functions consumes the reference for @fence both on success and error
+ * cases.
+ *
  * Returns:
  * 0 on success, or an error on failing to expand the array.
  */
Signature · 1 line
2.31.0
Signature · 3 lines
Daniel Vetter
Software Engineer, Intel Corporation
http://blog.ffwll.ch