summaryrefslogtreecommitdiff
path: root/drivers/staging/android/sync.h
diff options
context:
space:
mode:
authorGustavo Padovan <gustavo.padovan@collabora.co.uk>2016-05-31 19:59:04 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2016-06-18 04:17:40 (GMT)
commit0431b9065f28ecf6c320fefebe0241620049984f (patch)
tree4e0bdbe8038e56995f82e7c58db875d099053a84 /drivers/staging/android/sync.h
parent62627c8f61e09a6204cd77de30df9a83ff158812 (diff)
downloadlinux-0431b9065f28ecf6c320fefebe0241620049984f.tar.xz
staging/android: bring struct sync_pt back
Move the list_head members from sync_pt to struct fence was a mistake, they will not be used by struct fence as planned before, so here we create sync_pt again to bring the list heads back. Signed-off-by: Gustavo Padovan <gustavo.padovan@collabora.co.uk> Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch> Reviewed-by: Sumit Semwal <sumit.semwal@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/sync.h')
-rw-r--r--drivers/staging/android/sync.h29
1 files changed, 25 insertions, 4 deletions
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index f2fbf98..14b61cb 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -60,6 +60,27 @@ static inline struct sync_timeline *fence_parent(struct fence *fence)
child_list_lock);
}
+/**
+ * struct sync_pt - sync_pt object
+ * @base: base fence object
+ * @child_list: sync timeline child's list
+ * @active_list: sync timeline active child's list
+ */
+struct sync_pt {
+ struct fence base;
+ struct list_head child_list;
+ struct list_head active_list;
+};
+
+extern const struct fence_ops timeline_fence_ops;
+
+static inline struct sync_pt *fence_to_sync_pt(struct fence *fence)
+{
+ if (fence->ops != &timeline_fence_ops)
+ return NULL;
+ return container_of(fence, struct sync_pt, base);
+}
+
/*
* API for sync_timeline implementers
*/
@@ -101,13 +122,13 @@ void sync_timeline_signal(struct sync_timeline *obj, unsigned int inc);
* @size: size to allocate for this pt
* @inc: value of the fence
*
- * Creates a new fence as a child of @parent. @size bytes will be
+ * Creates a new sync_pt as a child of @parent. @size bytes will be
* allocated allowing for implementation specific data to be kept after
- * the generic sync_timeline struct. Returns the fence object or
+ * the generic sync_timeline struct. Returns the sync_pt object or
* NULL in case of error.
*/
-struct fence *sync_pt_create(struct sync_timeline *parent, int size,
- unsigned int inc);
+struct sync_pt *sync_pt_create(struct sync_timeline *parent, int size,
+ unsigned int inc);
#ifdef CONFIG_DEBUG_FS