Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 363281
b: refs/heads/master
c: dbd5239
h: refs/heads/master
i:
  363279: d0bc413
v: v3
  • Loading branch information
Erik Gilling authored and Greg Kroah-Hartman committed Mar 4, 2013
1 parent 0cbbaba commit 952aa4d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 9 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 4b5de08a37e8189c039424c92ca76ff605cf1c7f
refs/heads/master: dbd523905bac49da0643332e4eb0f2202e2acd06
18 changes: 16 additions & 2 deletions trunk/drivers/staging/android/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -847,7 +847,17 @@ static void sync_print_pt(struct seq_file *s, struct sync_pt *pt, bool fence)
seq_printf(s, "@%ld.%06ld", tv.tv_sec, tv.tv_usec);
}

if (pt->parent->ops->print_pt) {
if (pt->parent->ops->timeline_value_str &&
pt->parent->ops->pt_value_str) {
char value[64];
pt->parent->ops->pt_value_str(pt, value, sizeof(value));
seq_printf(s, ": %s", value);
if (fence) {
pt->parent->ops->timeline_value_str(pt->parent, value,
sizeof(value));
seq_printf(s, " / %s", value);
}
} else if (pt->parent->ops->print_pt) {
seq_printf(s, ": ");
pt->parent->ops->print_pt(s, pt);
}
Expand All @@ -862,7 +872,11 @@ static void sync_print_obj(struct seq_file *s, struct sync_timeline *obj)

seq_printf(s, "%s %s", obj->name, obj->ops->driver_name);

if (obj->ops->print_obj) {
if (obj->ops->timeline_value_str) {
char value[64];
obj->ops->timeline_value_str(obj, value, sizeof(value));
seq_printf(s, ": %s", value);
} else if (obj->ops->print_obj) {
seq_printf(s, ": ");
obj->ops->print_obj(s, obj);
}
Expand Down
19 changes: 13 additions & 6 deletions trunk/drivers/staging/android/sync.h
Original file line number Diff line number Diff line change
Expand Up @@ -40,14 +40,14 @@ struct sync_fence;
* -1 if a will signabl before b
* @free_pt: called before sync_pt is freed
* @release_obj: called before sync_timeline is freed
* @print_obj: print aditional debug information about sync_timeline.
* should not print a newline
* @print_pt: print aditional debug information about sync_pt.
* should not print a newline
* @print_obj: deprecated
* @print_pt: deprecated
* @fill_driver_data: write implmentation specific driver data to data.
* should return an error if there is not enough room
* as specified by size. This information is returned
* 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
*/
struct sync_timeline_ops {
const char *driver_name;
Expand All @@ -67,15 +67,22 @@ struct sync_timeline_ops {
/* optional */
void (*release_obj)(struct sync_timeline *sync_timeline);

/* optional */
/* deprecated */
void (*print_obj)(struct seq_file *s,
struct sync_timeline *sync_timeline);

/* optional */
/* deprecated */
void (*print_pt)(struct seq_file *s, struct sync_pt *sync_pt);

/* optional */
int (*fill_driver_data)(struct sync_pt *syncpt, void *data, int size);

/* optional */
void (*timeline_value_str)(struct sync_timeline *timeline, char *str,
int size);

/* optional */
void (*pt_value_str)(struct sync_pt *pt, char *str, int size);
};

/**
Expand Down

0 comments on commit 952aa4d

Please sign in to comment.