diff options
author | Dima Zavin <dima@android.com> | 2010-11-08 16:59:22 -0800 |
---|---|---|
committer | Dima Zavin <dima@android.com> | 2010-11-09 18:48:17 -0800 |
commit | 4834f503c164bfef881fac048054552f470a7df6 (patch) | |
tree | 73a8ad45e4d36a357a062671ab8d28bf729b7ac8 /drivers/media | |
parent | 5b5e9b563d64abf9ecbbb1c3fa5804ed5493bb8b (diff) |
media: video: tegra: add avp port transport info to debug dump
Change-Id: I7ade4469609ecf87663e6a6733842889b27f7ce5
Signed-off-by: Dima Zavin <dima@android.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/video/tegra/avp/avp.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/drivers/media/video/tegra/avp/avp.c b/drivers/media/video/tegra/avp/avp.c index 2fc0fab57309..7d4ecc05b2e4 100644 --- a/drivers/media/video/tegra/avp/avp.c +++ b/drivers/media/video/tegra/avp/avp.c @@ -30,6 +30,7 @@ #include <linux/mutex.h> #include <linux/platform_device.h> #include <linux/rbtree.h> +#include <linux/seq_file.h> #include <linux/slab.h> #include <linux/tegra_rpc.h> #include <linux/types.h> @@ -148,11 +149,13 @@ static struct avp_info *tegra_avp; static int avp_trpc_send(struct trpc_endpoint *ep, void *buf, size_t len); static void avp_trpc_close(struct trpc_endpoint *ep); +static void avp_trpc_show(struct seq_file *s, struct trpc_endpoint *ep); static void libs_cleanup(struct avp_info *avp); static struct trpc_ep_ops remote_ep_ops = { .send = avp_trpc_send, .close = avp_trpc_close, + .show = avp_trpc_show, }; static struct remote_info *rinfo_alloc(struct avp_info *avp) @@ -251,6 +254,24 @@ static struct remote_info *validate_trpc_ep(struct avp_info *avp, return NULL; } +static void avp_trpc_show(struct seq_file *s, struct trpc_endpoint *ep) +{ + struct avp_info *avp = tegra_avp; + struct remote_info *rinfo; + unsigned long flags; + + spin_lock_irqsave(&avp->state_lock, flags); + rinfo = validate_trpc_ep(avp, ep); + if (!rinfo) { + seq_printf(s, " <unknown>\n"); + goto out; + } + seq_printf(s, " loc_id:0x%x\n rem_id:0x%x\n", + rinfo->loc_id, rinfo->rem_id); +out: + spin_unlock_irqrestore(&avp->state_lock, flags); +} + static inline void mbox_writel(u32 val, void __iomem *mbox) { writel(val, mbox); |