diff options
-rw-r--r-- | drivers/video/tegra/host/dev.c | 11 | ||||
-rw-r--r-- | drivers/video/tegra/host/nvhost_intr.c | 4 | ||||
-rw-r--r-- | include/trace/events/nvhost.h | 32 |
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, |