diff options
author | Steven Toth <stoth@kernellabs.com> | 2011-10-10 18:09:56 +0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-10-15 00:22:55 +0400 |
commit | 19696f09daeff897a672144be89a16b8df18c004 (patch) | |
tree | 9f0ffdff875462b52a41e9db5c89f496b212162b /drivers/media/video/cx23885 | |
parent | d44aa2d7fc9fba30cf81f25ba33f1caf73e8fbb8 (diff) | |
download | linux-19696f09daeff897a672144be89a16b8df18c004.tar.xz |
[media] cx23885: Avoid incorrect error handling and reporting
Previous driver over-reported errors and stopped the video fifo
(causing video to stop) if 1) A risc error occured 2) The risc processor
detected that it has missing lines in the video frame 3) The risc fifo
is about to overflow.
The previous driver reported all three of these cases as risc errors
when this is technically not correct. So, the function was cleaned up.
1. Ensure that risc opcode related errors are correctly shown as such,
and not overly reported for non-risc-opcode cases.
2. Ensure that line sync and overflow errors are not reported as opcode errors.
3. Ensure that only the risc-op-code case can stop the fifo and dump channel
/ risc processor information.
The net result is that if video becomes unstable, cable disconnect, this will
not trigger a stop of the video firmware (due to missing lines errors).
Signed-off-by: Steven Toth <stoth@kernellabs.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/cx23885')
-rw-r--r-- | drivers/media/video/cx23885/cx23885-video.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/media/video/cx23885/cx23885-video.c b/drivers/media/video/cx23885/cx23885-video.c index 19900c66b799..c91be47c91ae 100644 --- a/drivers/media/video/cx23885/cx23885-video.c +++ b/drivers/media/video/cx23885/cx23885-video.c @@ -1536,29 +1536,29 @@ int cx23885_video_irq(struct cx23885_dev *dev, u32 status) cx_write(VID_A_INT_STAT, status); - /* risc op code error */ + /* risc op code error, fifo overflow or line sync detection error */ if ((status & VID_BC_MSK_OPC_ERR) || (status & VID_BC_MSK_SYNC) || (status & VID_BC_MSK_OF)) { - if (status & VID_BC_MSK_OPC_ERR) + if (status & VID_BC_MSK_OPC_ERR) { dprintk(7, " (VID_BC_MSK_OPC_ERR 0x%08x)\n", VID_BC_MSK_OPC_ERR); + printk(KERN_WARNING "%s: video risc op code error\n", + dev->name); + cx23885_sram_channel_dump(dev, + &dev->sram_channels[SRAM_CH01]); + } if (status & VID_BC_MSK_SYNC) - dprintk(7, " (VID_BC_MSK_SYNC 0x%08x)\n", + dprintk(7, " (VID_BC_MSK_SYNC 0x%08x) " + "video lines miss-match\n", VID_BC_MSK_SYNC); if (status & VID_BC_MSK_OF) - dprintk(7, " (VID_BC_MSK_OF 0x%08x)\n", + dprintk(7, " (VID_BC_MSK_OF 0x%08x) fifo overflow\n", VID_BC_MSK_OF); - printk(KERN_WARNING "%s: video risc op code error\n", - dev->name); - - cx_clear(VID_A_DMA_CTL, 0x11); - cx23885_sram_channel_dump(dev, &dev->sram_channels[SRAM_CH01]); - } /* Video */ |