summaryrefslogtreecommitdiffstats
path: root/drivers/media/video/cx18/cx18-mailbox.c
diff options
context:
space:
mode:
authorAndy Walls <awalls@radix.net>2008-11-18 02:48:46 +0100
committerMauro Carvalho Chehab <mchehab@redhat.com>2008-12-30 12:38:10 +0100
commitd6c7e5f8faad080e75bace5c4f2265e3513e3510 (patch)
treeec798a9f5644a005432ea3c435c8d563c2cc5abd /drivers/media/video/cx18/cx18-mailbox.c
parentV4L/DVB (9724): cx18: Streamline cx18-io[ch] wrappers and enforce MMIO retry ... (diff)
downloadlinux-d6c7e5f8faad080e75bace5c4f2265e3513e3510.tar.xz
linux-d6c7e5f8faad080e75bace5c4f2265e3513e3510.zip
V4L/DVB (9725): cx18: Remove unnecessary MMIO accesses in time critical irq handling path
Remove unnecessary MMIO accesses in time critical irq handling path. Also ensured that the mailbox ack field is read in last, so we know for sure if we have a stale mailbox or not on receipt. Signed-off-by: Andy Walls <awalls@radix.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx18/cx18-mailbox.c')
-rw-r--r--drivers/media/video/cx18/cx18-mailbox.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/media/video/cx18/cx18-mailbox.c b/drivers/media/video/cx18/cx18-mailbox.c
index 844a62de6535..e5d4f3112293 100644
--- a/drivers/media/video/cx18/cx18-mailbox.c
+++ b/drivers/media/video/cx18/cx18-mailbox.c
@@ -399,7 +399,12 @@ void cx18_api_epu_cmd_irq(struct cx18 *cx, int rpu)
order->flags = 0;
order->rpu = rpu;
order_mb = &order->mb;
- cx18_memcpy_fromio(cx, order_mb, mb, sizeof(struct cx18_mailbox));
+
+ /* mb->cmd and mb->args[0] through mb->args[2] */
+ cx18_memcpy_fromio(cx, &order_mb->cmd, &mb->cmd, 4 * sizeof(u32));
+ /* mb->request and mb->ack. N.B. we want to read mb->ack last */
+ cx18_memcpy_fromio(cx, &order_mb->request, &mb->request,
+ 2 * sizeof(u32));
if (order_mb->request == order_mb->ack) {
CX18_WARN("Possibly falling behind: %s self-ack'ed our incoming"