Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1363608
| From | Gustavo Padovan <gustavo@padovan.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [RFC 2/6] dma-buf/fence: add struct fence_collection |
| Date | 2016-03-23 19:50 +0100 |
| Message-ID | <rfW0V-7z3-3@gated-at.bofh.it> (permalink) |
| References | <rfW0V-7z3-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
The struct aggregates fences that we need to wait on before proceed with
some specific operation. In DRM, for example, we may wait for a group of
fences to signal before we scanout the buffers related to those fences.
Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk>
---
include/linux/fence.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/linux/fence.h b/include/linux/fence.h
index 605bd88..3d1151f 100644
--- a/include/linux/fence.h
+++ b/include/linux/fence.h
@@ -104,6 +104,22 @@ struct fence_cb {
fence_func_t func;
};
+typedef void (*collection_put_func_t)(void *data);
+
+/**
+ * struct fence_collection - aggregate fences together
+ * @num_fences: number of fence in the collection.
+ * @user_data: user data.
+ * @func: user callback to put user data.
+ * @fences: array of @num_fences fences.
+ */
+struct fence_collection {
+ int num_fences;
+ void *user_data;
+ collection_put_func_t func;
+ struct fence *fences[];
+};
+
/**
* struct fence_ops - operations implemented for fence
* @get_driver_name: returns the driver name.
--
2.5.0
Back to linux.kernel | Previous | Next | Find similar | Unroll thread
[RFC 2/6] dma-buf/fence: add struct fence_collection Gustavo Padovan <gustavo@padovan.org> - 2016-03-23 19:50 +0100
csiph-web