aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/saa7164/saa7164-encoder.c
diff options
context:
space:
mode:
authorSteven Toth <stoth@kernellabs.com>2010-07-31 14:10:52 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-10-21 05:54:52 -0400
commit58acca1056434dbbbcb3f1aacd759f1039a3169d (patch)
tree66661f935aae0ca46a6cba3a7daf2280acf7bd4c /drivers/media/video/saa7164/saa7164-encoder.c
parent66e1d37884eb43214292ed433fcffb72692c4838 (diff)
[media] saa7164: measure via histograms various irq and queue latencies
saa7164: measure via histograms various irq and queue latencies Attempting to determine where buffering issues under high load are due to highly latent irq or work queue handling. Signed-off-by: Steven Toth <stoth@kernellabs.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/saa7164/saa7164-encoder.c')
-rw-r--r--drivers/media/video/saa7164/saa7164-encoder.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/drivers/media/video/saa7164/saa7164-encoder.c b/drivers/media/video/saa7164/saa7164-encoder.c
index e340a6e39dfc..5f73ceded31b 100644
--- a/drivers/media/video/saa7164/saa7164-encoder.c
+++ b/drivers/media/video/saa7164/saa7164-encoder.c
@@ -1030,6 +1030,14 @@ static ssize_t fops_read(struct file *file, char __user *buffer,
1030 int rem, cnt; 1030 int rem, cnt;
1031 u8 *p; 1031 u8 *p;
1032 1032
1033 port->last_read_msecs_diff = port->last_read_msecs;
1034 port->last_read_msecs = jiffies_to_msecs(jiffies);
1035 port->last_read_msecs_diff = port->last_read_msecs -
1036 port->last_read_msecs_diff;
1037
1038 saa7164_histogram_update(&port->read_interval,
1039 port->last_read_msecs_diff);
1040
1033 if (*pos) 1041 if (*pos)
1034 return -ESPIPE; 1042 return -ESPIPE;
1035 1043
@@ -1114,6 +1122,14 @@ static unsigned int fops_poll(struct file *file, poll_table *wait)
1114 struct saa7164_user_buffer *ubuf; 1122 struct saa7164_user_buffer *ubuf;
1115 unsigned int mask = 0; 1123 unsigned int mask = 0;
1116 1124
1125 port->last_poll_msecs_diff = port->last_poll_msecs;
1126 port->last_poll_msecs = jiffies_to_msecs(jiffies);
1127 port->last_poll_msecs_diff = port->last_poll_msecs -
1128 port->last_poll_msecs_diff;
1129
1130 saa7164_histogram_update(&port->poll_interval,
1131 port->last_poll_msecs_diff);
1132
1117 if (!video_is_registered(port->v4l_device)) { 1133 if (!video_is_registered(port->v4l_device)) {
1118 return -EIO; 1134 return -EIO;
1119 } 1135 }