aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-firmware.c
diff options
context:
space:
mode:
authorIan Armstrong <ian@iarmst.demon.co.uk>2008-01-26 06:52:58 -0500
committerMauro Carvalho Chehab <mchehab@infradead.org>2008-03-20 11:38:57 -0400
commita54d1dea0071a4f6aa46d8e937428c053732efcb (patch)
treecb3c12f06ecc4cc940293142aef5d92ec36a4eea /drivers/media/video/ivtv/ivtv-firmware.c
parente8d35932e9942dffcc96c03f539d7e261d641bfd (diff)
V4L/DVB (7242): ivtv: fix for yuv filter table check
As the result of a previous change that delayed the loading of the firmware, the driver can sometimes report a bogus error regarding the yuv output filter table not being found in the firmware. This patch moves the filter table check to ensure it's only done after the firmware has been loaded. Signed-off-by: Ian Armstrong <ian@iarmst.demon.co.uk> Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-firmware.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-firmware.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-firmware.c b/drivers/media/video/ivtv/ivtv-firmware.c
index 425eb1063904..6dba55b7e25a 100644
--- a/drivers/media/video/ivtv/ivtv-firmware.c
+++ b/drivers/media/video/ivtv/ivtv-firmware.c
@@ -22,6 +22,7 @@
22#include "ivtv-driver.h" 22#include "ivtv-driver.h"
23#include "ivtv-mailbox.h" 23#include "ivtv-mailbox.h"
24#include "ivtv-firmware.h" 24#include "ivtv-firmware.h"
25#include "ivtv-yuv.h"
25#include <linux/firmware.h> 26#include <linux/firmware.h>
26 27
27#define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE 28#define IVTV_MASK_SPU_ENABLE 0xFFFFFFFE
@@ -225,11 +226,14 @@ int ivtv_firmware_init(struct ivtv *itv)
225 return 0; 226 return 0;
226 227
227 itv->dec_mbox.mbox = ivtv_search_mailbox(itv->dec_mem, IVTV_DECODER_SIZE); 228 itv->dec_mbox.mbox = ivtv_search_mailbox(itv->dec_mem, IVTV_DECODER_SIZE);
228 if (itv->dec_mbox.mbox == NULL) 229 if (itv->dec_mbox.mbox == NULL) {
229 IVTV_ERR("Decoder mailbox not found\n"); 230 IVTV_ERR("Decoder mailbox not found\n");
230 else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) { 231 } else if (itv->has_cx23415 && ivtv_vapi(itv, CX2341X_DEC_PING_FW, 0)) {
231 IVTV_ERR("Decoder firmware dead!\n"); 232 IVTV_ERR("Decoder firmware dead!\n");
232 itv->dec_mbox.mbox = NULL; 233 itv->dec_mbox.mbox = NULL;
234 } else {
235 /* Firmware okay, so check yuv output filter table */
236 ivtv_yuv_filter_check(itv);
233 } 237 }
234 return itv->dec_mbox.mbox ? 0 : -ENODEV; 238 return itv->dec_mbox.mbox ? 0 : -ENODEV;
235} 239}