summaryrefslogtreecommitdiffstats
path: root/drivers/staging/android/trace
diff options
context:
space:
mode:
authorMaarten Lankhorst2014-07-01 12:57:31 +0200
committerGreg Kroah-Hartman2014-07-08 22:28:26 +0200
commit0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea (patch)
tree63dbd1e8f3f41406ea0715b0889d7bd6545301e2 /drivers/staging/android/trace
parentdma-buf: use reservation objects (diff)
downloadkernel-qcow2-linux-0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea.tar.gz
kernel-qcow2-linux-0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea.tar.xz
kernel-qcow2-linux-0f0d8406fb9c3c5ed1b1609a0f51c504c5b37aea.zip
android: convert sync to fence api, v6
Just to show it's easy. Android syncpoints can be mapped to a timeline. This removes the need to maintain a separate api for synchronization. I've left the android trace events in place, but the core fence events should already be sufficient for debugging. v2: - Call fence_remove_callback in sync_fence_free if not all fences have fired. v3: - Merge Colin Cross' bugfixes, and the android fence merge optimization. v4: - Merge with the upstream fixes. v5: - Fix small style issues pointed out by Thomas Hellstrom. v6: - Fix for updates to fence api. Signed-off-by: Maarten Lankhorst <maarten.lankhorst@canonical.com> Acked-by: John Stultz <john.stultz@linaro.org> Acked-by: Sumit Semwal <sumit.semwal@linaro.org> Acked-by: Daniel Vetter <daniel@ffwll.ch> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/trace')
-rw-r--r--drivers/staging/android/trace/sync.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/staging/android/trace/sync.h b/drivers/staging/android/trace/sync.h
index 95462359ba57..77edb977a7bf 100644
--- a/drivers/staging/android/trace/sync.h
+++ b/drivers/staging/android/trace/sync.h
@@ -45,7 +45,7 @@ TRACE_EVENT(sync_wait,
TP_fast_assign(
__assign_str(name, fence->name);
- __entry->status = fence->status;
+ __entry->status = atomic_read(&fence->status);
__entry->begin = begin;
),
@@ -54,19 +54,19 @@ TRACE_EVENT(sync_wait,
);
TRACE_EVENT(sync_pt,
- TP_PROTO(struct sync_pt *pt),
+ TP_PROTO(struct fence *pt),
TP_ARGS(pt),
TP_STRUCT__entry(
- __string(timeline, pt->parent->name)
+ __string(timeline, pt->ops->get_timeline_name(pt))
__array(char, value, 32)
),
TP_fast_assign(
- __assign_str(timeline, pt->parent->name);
- if (pt->parent->ops->pt_value_str) {
- pt->parent->ops->pt_value_str(pt, __entry->value,
+ __assign_str(timeline, pt->ops->get_timeline_name(pt));
+ if (pt->ops->fence_value_str) {
+ pt->ops->fence_value_str(pt, __entry->value,
sizeof(__entry->value));
} else {
__entry->value[0] = '\0';