V4L/DVB (9596): cx18: Further changes to improve mailbox protocol integrity & performnce
All waits for cx18 mailbox API commands are now uninterruptable. Added
code to collect mailbox ack statistics. Tweaked timeouts based on collected
stats and video vertical frame and field rates.
Signed-off-by: Andy Walls <awalls@radix.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
diff --git a/drivers/media/video/cx18/cx18-driver.h b/drivers/media/video/cx18/cx18-driver.h
index e2ec155..ce76806 100644
--- a/drivers/media/video/cx18/cx18-driver.h
+++ b/drivers/media/video/cx18/cx18-driver.h
@@ -360,6 +360,12 @@
atomic_t retried_read[CX18_MAX_MMIO_RD_RETRIES+1];
};
+#define CX18_MAX_MB_ACK_DELAY 100
+
+struct cx18_mbox_stats {
+ atomic_t mb_ack_delay[CX18_MAX_MB_ACK_DELAY+1];
+};
+
/* Struct to hold info about cx18 cards */
struct cx18 {
int num; /* board number, -1 during init! */
@@ -452,6 +458,7 @@
/* Statistics */
struct cx18_mmio_stats mmio_stats;
+ struct cx18_mbox_stats mbox_stats;
/* v4l2 and User settings */