diff options
author | Shridhar Rasal <srasal@nvidia.com> | 2014-06-04 17:42:18 +0530 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-06-23 22:50:44 -0700 |
commit | 7fa5bf44d76fd5d93360a75fed590590a7247dbd (patch) | |
tree | e3e58f64c2e6d346c4f93b19b521efe4ef1d5beb /drivers/staging | |
parent | f3063aeb4e0657ebfb2810354c860345ac4f17bc (diff) |
sync: add API to get syncpt name
Currently, we print only syncpoint id and on sync timeout.
Also print syncpoint name in dump.
Bug 200007874
Change-Id: Ia28a5b12b037a0b718bd4e5727f20c19d8badd87
Reviewed-on: http://git-master/r/418926
(cherry picked from commit e79d93d205ca2daba2974745113088222fa90297)
Signed-off-by: Shridhar Rasal <srasal@nvidia.com>
Reviewed-on: http://git-master/r/426604
Reviewed-by: Terje Bergstrom <tbergstrom@nvidia.com>
Diffstat (limited to 'drivers/staging')
-rw-r--r-- | drivers/staging/android/sync.c | 11 | ||||
-rw-r--r-- | drivers/staging/android/sync.h | 4 |
2 files changed, 12 insertions, 3 deletions
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index 60af5a157a18..eb8a5f58f9ee 100644 --- a/drivers/staging/android/sync.c +++ b/drivers/staging/android/sync.c @@ -849,11 +849,16 @@ static void sync_fence_dump(struct sync_fence *fence) { struct sync_pt *pt; char val[32]; - char current_val[64]; + char current_val[32]; + char name[32]; list_for_each_entry(pt, &fence->pt_list_head, pt_list) { val[0] = '\0'; current_val[0] = '\0'; + name[0] = '\0'; + if (pt->parent->ops->get_pt_name) + pt->parent->ops->get_pt_name(pt, name, sizeof(name)); + if (pt->parent->ops->pt_value_str) pt->parent->ops->pt_value_str(pt, val, sizeof(val)); @@ -862,8 +867,8 @@ static void sync_fence_dump(struct sync_fence *fence) current_val, sizeof(current_val)); - pr_info("name=%s, current value=%s waiting value=%s\n", - pt->parent->name, current_val, val); + pr_info("name=[%s:%s], current value=%s waiting value=%s\n", + pt->parent->name, name, current_val, val); } } diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h index 75da9e85ac69..862662c0abc6 100644 --- a/drivers/staging/android/sync.h +++ b/drivers/staging/android/sync.h @@ -48,6 +48,7 @@ struct sync_fence; * to userspace by SYNC_IOC_FENCE_INFO. * @timeline_value_str: fill str with the value of the sync_timeline's counter * @pt_value_str: fill str with the value of the sync_pt + * @get_pt_name: fill str with the name of the sync_pt */ struct sync_timeline_ops { const char *driver_name; @@ -83,6 +84,9 @@ struct sync_timeline_ops { /* optional */ void (*pt_value_str)(struct sync_pt *pt, char *str, int size); + + /* optional */ + void (*get_pt_name)(struct sync_pt *pt, char *str, int size); }; /** |