summaryrefslogtreecommitdiff
path: root/drivers/media/pci/cobalt/cobalt-driver.c
diff options
context:
space:
mode:
authorHans Verkuil <hans.verkuil@cisco.com>2015-05-21 12:19:28 +0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-05-30 17:19:01 +0300
commit86bad00a2fd5327925417eb05a2b3d1819c42a70 (patch)
tree9735dc7106a976f6bd3bfcf150c6f4e2157b1257 /drivers/media/pci/cobalt/cobalt-driver.c
parent1e35c77dd1f8f3c1c8ef419ec422250fecb31fef (diff)
downloadlinux-86bad00a2fd5327925417eb05a2b3d1819c42a70.tar.xz
[media] cobalt: fix irqs used for the adv7511 transmitter
The interrupt bit assignments use for the adv7511 were off by one. This means that the current scheme (bit << (4 * stream_index)) can no longer be used. Fix this by precalculating and storing the correct masks in the cobalt_stream struct. This wasn't noticed before because the adv7511 interrupts are very rare. But for CEC support these interrupts are essential, so this made me realize that it wasn't working correctly. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cobalt/cobalt-driver.c')
-rw-r--r--drivers/media/pci/cobalt/cobalt-driver.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/drivers/media/pci/cobalt/cobalt-driver.c b/drivers/media/pci/cobalt/cobalt-driver.c
index 0f2549ab4c2b..0534d7183809 100644
--- a/drivers/media/pci/cobalt/cobalt-driver.c
+++ b/drivers/media/pci/cobalt/cobalt-driver.c
@@ -451,20 +451,30 @@ static void cobalt_stream_struct_init(struct cobalt *cobalt)
if (i <= COBALT_HSMA_IN_NODE) {
s->dma_channel = i + cobalt->first_fifo_channel;
s->video_channel = i;
+ s->dma_fifo_mask =
+ COBALT_SYSSTAT_VI0_LOST_DATA_MSK << (4 * i);
+ s->adv_irq_mask =
+ COBALT_SYSSTAT_VI0_INT1_MSK << (4 * i);
} else if (i >= COBALT_AUDIO_IN_STREAM &&
i <= COBALT_AUDIO_IN_STREAM + 4) {
- s->dma_channel = 6 + i - COBALT_AUDIO_IN_STREAM;
+ unsigned idx = i - COBALT_AUDIO_IN_STREAM;
+
+ s->dma_channel = 6 + idx;
s->is_audio = true;
- s->video_channel = i - COBALT_AUDIO_IN_STREAM;
+ s->video_channel = idx;
+ s->dma_fifo_mask = COBALT_SYSSTAT_AUD_IN_LOST_DATA_MSK;
} else if (i == COBALT_HSMA_OUT_NODE) {
s->dma_channel = 11;
s->is_output = true;
s->video_channel = 5;
+ s->dma_fifo_mask = COBALT_SYSSTAT_VOHSMA_LOST_DATA_MSK;
+ s->adv_irq_mask = COBALT_SYSSTAT_VOHSMA_INT1_MSK;
} else if (i == COBALT_AUDIO_OUT_STREAM) {
s->dma_channel = 12;
s->is_audio = true;
s->is_output = true;
s->video_channel = 5;
+ s->dma_fifo_mask = COBALT_SYSSTAT_AUD_OUT_LOST_DATA_MSK;
} else {
/* FIXME: Memory DMA for debug purpose */
s->dma_channel = i - COBALT_NUM_NODES;