diff options
author | Erik Gilling <konkers@android.com> | 2012-08-02 17:26:45 -0700 |
---|---|---|
committer | Arve Hjønnevåg <arve@android.com> | 2013-04-29 14:43:00 -0700 |
commit | 1ef77482080c74f3e60b35e6ea45b1a74aae5625 (patch) | |
tree | c5ec27e08461eb09e3d4e2460ffd64e1ca78d842 /include/linux/sync.h | |
parent | 7587b0ab228d145728085a24b9d0e4a08437546c (diff) |
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.
Change-Id: I1cd8ddb638eded7db9db446ff6b37f3dd165d6c4
Signed-off-by: Erik Gilling <konkers@android.com>
Diffstat (limited to 'include/linux/sync.h')
-rw-r--r-- | include/linux/sync.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/sync.h b/include/linux/sync.h index 00c9bae9706..15863a6ebe5 100644 --- a/include/linux/sync.h +++ b/include/linux/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]; |