From 4834f503c164bfef881fac048054552f470a7df6 Mon Sep 17 00:00:00 2001 From: Dima Zavin Date: Mon, 8 Nov 2010 16:59:22 -0800 Subject: [PATCH] media: video: tegra: add avp port transport info to debug dump Change-Id: I7ade4469609ecf87663e6a6733842889b27f7ce5 Signed-off-by: Dima Zavin --- drivers/media/video/tegra/avp/avp.c | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) 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 #include #include +#include #include #include #include @@ -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, " \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); -- 2.34.1