staging: sync: Add debugfs support
Add support for debugfs
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: Add commit message]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
diff --git a/drivers/staging/android/sync.h b/drivers/staging/android/sync.h
index a8e289d..d64271b 100644
--- a/drivers/staging/android/sync.h
+++ b/drivers/staging/android/sync.h
@@ -39,6 +39,10 @@
* -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
*/
struct sync_timeline_ops {
const char *driver_name;
@@ -57,6 +61,13 @@
/* optional */
void (*release_obj)(struct sync_timeline *sync_timeline);
+
+ /* optional */
+ void (*print_obj)(struct seq_file *s,
+ struct sync_timeline *sync_timeline);
+
+ /* optional */
+ void (*print_pt)(struct seq_file *s, struct sync_pt *sync_pt);
};
/**
@@ -68,6 +79,7 @@
* @child_list_lock: lock protecting @child_list_head, destroyed, and
* sync_pt.status
* @active_list_head: list of active (unsignaled/errored) sync_pts
+ * @sync_timeline_list: membership in global sync_timeline_list
*/
struct sync_timeline {
const struct sync_timeline_ops *ops;
@@ -81,6 +93,8 @@
struct list_head active_list_head;
spinlock_t active_list_lock;
+
+ struct list_head sync_timeline_list;
};
/**
@@ -120,6 +134,7 @@
* @status: 1: signaled, 0:active, <0: error
*
* @wq: wait queue for fence signaling
+ * @sync_fence_list: membership in global fence list
*/
struct sync_fence {
struct file *file;
@@ -133,6 +148,8 @@
int status;
wait_queue_head_t wq;
+
+ struct list_head sync_fence_list;
};
/**
@@ -281,9 +298,6 @@
*/
int sync_fence_wait(struct sync_fence *fence, long timeout);
-/* useful for sync driver's debug print handlers */
-const char *sync_status_str(int status);
-
#endif /* __KERNEL__ */
/**