aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-mailbox.c
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2010-06-12 13:41:57 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2010-08-02 14:48:13 -0300
commit215659d14f9dbc849ccda1655c94d710f8cc6384 (patch)
tree7f1c65043106c2b14492616e48b17d76243a20f4 /drivers/media/video/ivtv/ivtv-mailbox.c
parent914610e8c508224a6fb9fb501ed4bda25b340ba6 (diff)
downloadkernel_samsung_tuna-215659d14f9dbc849ccda1655c94d710f8cc6384.zip
kernel_samsung_tuna-215659d14f9dbc849ccda1655c94d710f8cc6384.tar.gz
kernel_samsung_tuna-215659d14f9dbc849ccda1655c94d710f8cc6384.tar.bz2
V4L/DVB: ivtv: Automatic firmware reload
If the firmware has failed, this patch will automatically reload & restart the card. The previous card state will be restored on a successful restart. Firmware reload will only happen if neither the encoder or decoder is active. If the card is busy then behaviour is as before, returning -EIO on device access until the reload can occur. On cards that support video output, coloured bars will be displayed during the reload. Andy Walls (ivtv maintainer and patch committer) made minor tweaks to comments and the logged messages, but nothing substantial otherwise. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Andy Walls <awalls@md.metrocast.net> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-mailbox.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-mailbox.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/media/video/ivtv/ivtv-mailbox.c b/drivers/media/video/ivtv/ivtv-mailbox.c
index 84577f6..e3ce967 100644
--- a/drivers/media/video/ivtv/ivtv-mailbox.c
+++ b/drivers/media/video/ivtv/ivtv-mailbox.c
@@ -377,3 +377,11 @@ void ivtv_api_get_data(struct ivtv_mailbox_data *mbdata, int mb,
for (i = 0; i < argc; i++, p++)
data[i] = readl(p);
}
+
+/* Wipe api cache */
+void ivtv_mailbox_cache_invalidate(struct ivtv *itv)
+{
+ int i;
+ for (i = 0; i < 256; i++)
+ itv->api_cache[i].last_jiffies = 0;
+}