[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1453833026-24637-11-git-send-email-gustavo@padovan.org>
Date: Tue, 26 Jan 2016 16:30:25 -0200
From: Gustavo Padovan <gustavo@...ovan.org>
To: Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Cc: linux-kernel@...r.kernel.org, devel@...verdev.osuosl.org,
dri-devel@...ts.freedesktop.org,
Daniel Stone <daniels@...labora.com>,
Arve Hjønnevåg <arve@...roid.com>,
Riley Andrews <riandrews@...roid.com>,
Daniel Vetter <daniel.vetter@...ll.ch>,
Rob Clark <robdclark@...il.com>,
Greg Hackmann <ghackmann@...gle.com>,
John Harrison <John.C.Harrison@...el.com>,
Maarten Lankhorst <maarten.lankhorst@...ux.intel.com>,
Gustavo Padovan <gustavo.padovan@...labora.co.uk>
Subject: [PATCH 10/11] dma-buf/sync_file: bring debug back to sync file
From: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
Enable reports of sync_files through <debugfs>/sync/info
Signed-off-by: Gustavo Padovan <gustavo.padovan@...labora.co.uk>
---
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
Powered by blists - more mailing lists