[PATCH 10/11] dma-buf/sync_file: bring debug back to sync file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>

Enable reports of sync_files through <debugfs>/sync/info

Signed-off-by: Gustavo Padovan <gustavo.padovan@xxxxxxxxxxxxxxx>
---
 drivers/dma-buf/sync_file.c | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/drivers/dma-buf/sync_file.c b/drivers/dma-buf/sync_file.c
index 92474dd..aa1215d 100644
--- a/drivers/dma-buf/sync_file.c
+++ b/drivers/dma-buf/sync_file.c
@@ -29,6 +29,8 @@
 #define CREATE_TRACE_POINTS
 #include <trace/events/sync_file.h>
 
+#include "sync_debug.h"
+
 static const struct file_operations sync_file_fops;
 
 static struct sync_file *sync_file_alloc(int size, const char *name)
@@ -87,6 +89,8 @@ struct sync_file *sync_file_create(const char *name, struct fence *fence)
 			       fence_check_cb_func))
 		atomic_dec(&sync_file->status);
 
+	sync_file_debug_add(sync_file);
+
 	return sync_file;
 }
 EXPORT_SYMBOL(sync_file_create);
@@ -188,6 +192,7 @@ struct sync_file *sync_file_merge(const char *name,
 		atomic_sub(num_fences - i, &sync_file->status);
 	sync_file->num_fences = i;
 
+	sync_file_debug_add(sync_file);
 	return sync_file;
 }
 EXPORT_SYMBOL(sync_file_merge);
@@ -246,6 +251,8 @@ static int sync_file_release(struct inode *inode, struct file *file)
 {
 	struct sync_file *sync_file = file->private_data;
 
+	sync_file_debug_remove(sync_file);
+
 	kref_put(&sync_file->kref, sync_file_free);
 	return 0;
 }
-- 
2.5.0

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux