summaryrefslogtreecommitdiff
path: root/drivers/staging/android/sync.h
diff options
context:
space:
mode:
authorErik Gilling <konkers@android.com>2013-03-01 00:43:11 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-03-04 09:44:07 (GMT)
commitc5b86b7418f46220a623277718d6a909f520477b (patch)
tree3dc3f52f69efca8d04c4e555f168904097a0227d /drivers/staging/android/sync.h
parent01544170e1959dd261ceec6413674a528221669b (diff)
downloadlinux-c5b86b7418f46220a623277718d6a909f520477b.tar.xz
staging: sync: Add reference counting to timelines
If a timeline is destroyed while fences still hold pts on it, the reworked fence release handler can cause the timeline to be freed before all it's points are freed. Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com> Cc: Erik Gilling <konkers@android.com> Cc: Daniel Vetter <daniel.vetter@ffwll.ch> Cc: Rob Clark <robclark@gmail.com> Cc: Sumit Semwal <sumit.semwal@linaro.org> Cc: dri-devel@lists.freedesktop.org Cc: Android Kernel Team <kernel-team@android.com> Signed-off-by: Erik Gilling <konkers@android.com> [jstultz: Squished in compiler warning fix] Signed-off-by: John Stultz <john.stultz@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.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index 00c9bae..15863a6 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -80,6 +80,7 @@ struct sync_timeline_ops {
/**
* struct sync_timeline - sync object
+ * @kref: reference count on fence.
* @ops: ops that define the implementaiton of the sync_timeline
* @name: name of the sync_timeline. Useful for debugging
* @destoryed: set when sync_timeline is destroyed
@@ -90,6 +91,7 @@ struct sync_timeline_ops {
* @sync_timeline_list: membership in global sync_timeline_list
*/
struct sync_timeline {
+ struct kref kref;
const struct sync_timeline_ops *ops;
char name[32];