summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTerje Bergstrom <tbergstrom@nvidia.com>2011-11-17 13:11:21 +0200
committerSimone Willett <swillett@nvidia.com>2012-02-18 10:23:51 -0800
commit779324a9b98d37b6d8b443b682e4f5dc608cb1ef (patch)
tree263cc478097af48808c203e92fe83c5dfca81a00
parent233f011b4784e7e1b7c90f0a63827668da444661 (diff)
video: tegra: host: Add syncpt value to traces
Add current values of sync points to sync point read and wait IOCTL's. Change-Id: I479a66e283b47867ed13685b75c1858b4fb65c2d Signed-off-by: Terje Bergstrom <tbergstrom@nvidia.com> Reviewed-on: http://git-master/r/80006 Reviewed-by: Simone Willett <swillett@nvidia.com> Tested-by: Simone Willett <swillett@nvidia.com>
-rw-r--r--drivers/video/tegra/host/dev.c11
-rw-r--r--drivers/video/tegra/host/nvhost_intr.c4
-rw-r--r--include/trace/events/nvhost.h32
3 files changed, 30 insertions, 17 deletions
diff --git a/drivers/video/tegra/host/dev.c b/drivers/video/tegra/host/dev.c
index 4cd1e4eaf843..8d002979de1e 100644
--- a/drivers/video/tegra/host/dev.c
+++ b/drivers/video/tegra/host/dev.c
@@ -567,8 +567,8 @@ static int nvhost_ioctl_ctrl_syncpt_read(
{
if (args->id >= ctx->dev->syncpt.nb_pts)
return -EINVAL;
- trace_nvhost_ioctl_ctrl_syncpt_read(args->id);
args->value = nvhost_syncpt_read(&ctx->dev->syncpt, args->id);
+ trace_nvhost_ioctl_ctrl_syncpt_read(args->id, args->value);
return 0;
}
@@ -588,6 +588,7 @@ static int nvhost_ioctl_ctrl_syncpt_waitex(
struct nvhost_ctrl_syncpt_waitex_args *args)
{
u32 timeout;
+ int err;
if (args->id >= ctx->dev->syncpt.nb_pts)
return -EINVAL;
if (args->timeout == NVHOST_NO_TIMEOUT)
@@ -595,10 +596,12 @@ static int nvhost_ioctl_ctrl_syncpt_waitex(
else
timeout = (u32)msecs_to_jiffies(args->timeout);
- trace_nvhost_ioctl_ctrl_syncpt_wait(args->id, args->thresh,
- args->timeout);
- return nvhost_syncpt_wait_timeout(&ctx->dev->syncpt, args->id,
+ err = nvhost_syncpt_wait_timeout(&ctx->dev->syncpt, args->id,
args->thresh, timeout, &args->value);
+ trace_nvhost_ioctl_ctrl_syncpt_wait(args->id, args->thresh,
+ args->timeout, args->value, err);
+
+ return err;
}
static int nvhost_ioctl_ctrl_module_mutex(
diff --git a/drivers/video/tegra/host/nvhost_intr.c b/drivers/video/tegra/host/nvhost_intr.c
index 7fdf5e9f2e35..0b411bd5d09c 100644
--- a/drivers/video/tegra/host/nvhost_intr.c
+++ b/drivers/video/tegra/host/nvhost_intr.c
@@ -3,7 +3,7 @@
*
* Tegra Graphics Host Interrupt Management
*
- * Copyright (c) 2010-2011, NVIDIA Corporation.
+ * Copyright (c) 2010-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -133,7 +133,7 @@ static void action_submit_complete(struct nvhost_waitlist *waiter)
/* Add nr_completed to trace */
trace_nvhost_channel_submit_complete(channel->dev->name,
- nr_completed);
+ nr_completed, waiter->thresh);
nvhost_cdma_update(&channel->cdma);
nvhost_module_idle_mult(channel->dev, nr_completed);
diff --git a/include/trace/events/nvhost.h b/include/trace/events/nvhost.h
index 6c266b9f2ea4..1e28559c9287 100644
--- a/include/trace/events/nvhost.h
+++ b/include/trace/events/nvhost.h
@@ -3,7 +3,7 @@
*
* Nvhost event logging to ftrace.
*
- * Copyright (c) 2010-2011, NVIDIA Corporation.
+ * Copyright (c) 2010-2012, NVIDIA Corporation.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -291,40 +291,47 @@ TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_incr,
);
TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_read,
- TP_PROTO(u32 id),
+ TP_PROTO(u32 id, u32 value),
- TP_ARGS(id),
+ TP_ARGS(id, value),
TP_STRUCT__entry(
__field(u32, id);
+ __field(u32, value);
),
TP_fast_assign(
__entry->id = id;
+ __entry->value = value;
),
- TP_printk("id=%d", __entry->id)
+ TP_printk("id=%d, value=%d", __entry->id, __entry->value)
);
TRACE_EVENT(nvhost_ioctl_ctrl_syncpt_wait,
- TP_PROTO(u32 id, u32 threshold, s32 timeout),
+ TP_PROTO(u32 id, u32 threshold, s32 timeout, u32 value, int err),
- TP_ARGS(id, threshold, timeout),
+ TP_ARGS(id, threshold, timeout, value, err),
TP_STRUCT__entry(
__field(u32, id)
__field(u32, threshold)
__field(s32, timeout)
+ __field(u32, value)
+ __field(int, err)
),
TP_fast_assign(
__entry->id = id;
__entry->threshold = threshold;
__entry->timeout = timeout;
+ __entry->value = value;
+ __entry->err = err;
),
- TP_printk("id=%u, threshold=%u, timeout=%d",
- __entry->id, __entry->threshold, __entry->timeout)
+ TP_printk("id=%u, threshold=%u, timeout=%d, value=%u, err=%d",
+ __entry->id, __entry->threshold, __entry->timeout,
+ __entry->value, __entry->err)
);
TRACE_EVENT(nvhost_ioctl_ctrl_module_regrdwr,
@@ -370,21 +377,24 @@ TRACE_EVENT(nvhost_channel_submitted,
);
TRACE_EVENT(nvhost_channel_submit_complete,
- TP_PROTO(const char *name, int count),
+ TP_PROTO(const char *name, int count, u32 thresh),
- TP_ARGS(name, count),
+ TP_ARGS(name, count, thresh),
TP_STRUCT__entry(
__field(const char *, name)
__field(int, count)
+ __field(u32, thresh)
),
TP_fast_assign(
__entry->name = name;
__entry->count = count;
+ __entry->thresh = thresh;
),
- TP_printk("name=%s, count=%d", __entry->name, __entry->count)
+ TP_printk("name=%s, count=%d, thresh=%d",
+ __entry->name, __entry->count, __entry->thresh)
);
TRACE_EVENT(nvhost_wait_cdma,