diff options
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-irq.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c index cd9db0bf33bf..12d36ca91d53 100644 --- a/drivers/media/video/ivtv/ivtv-irq.c +++ b/drivers/media/video/ivtv/ivtv-irq.c | |||
@@ -562,7 +562,7 @@ static void ivtv_irq_enc_dma_complete(struct ivtv *itv) | |||
562 | u32 data[CX2341X_MBOX_MAX_DATA]; | 562 | u32 data[CX2341X_MBOX_MAX_DATA]; |
563 | struct ivtv_stream *s; | 563 | struct ivtv_stream *s; |
564 | 564 | ||
565 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, data); | 565 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data); |
566 | IVTV_DEBUG_HI_IRQ("ENC DMA COMPLETE %x %d (%d)\n", data[0], data[1], itv->cur_dma_stream); | 566 | IVTV_DEBUG_HI_IRQ("ENC DMA COMPLETE %x %d (%d)\n", data[0], data[1], itv->cur_dma_stream); |
567 | 567 | ||
568 | del_timer(&itv->dma_timer); | 568 | del_timer(&itv->dma_timer); |
@@ -638,7 +638,7 @@ static void ivtv_irq_dma_err(struct ivtv *itv) | |||
638 | u32 data[CX2341X_MBOX_MAX_DATA]; | 638 | u32 data[CX2341X_MBOX_MAX_DATA]; |
639 | 639 | ||
640 | del_timer(&itv->dma_timer); | 640 | del_timer(&itv->dma_timer); |
641 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, data); | 641 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, 2, data); |
642 | IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1], | 642 | IVTV_DEBUG_WARN("DMA ERROR %08x %08x %08x %d\n", data[0], data[1], |
643 | read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream); | 643 | read_reg(IVTV_REG_DMASTATUS), itv->cur_dma_stream); |
644 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); | 644 | write_reg(read_reg(IVTV_REG_DMASTATUS) & 3, IVTV_REG_DMASTATUS); |
@@ -669,7 +669,7 @@ static void ivtv_irq_enc_start_cap(struct ivtv *itv) | |||
669 | struct ivtv_stream *s; | 669 | struct ivtv_stream *s; |
670 | 670 | ||
671 | /* Get DMA destination and size arguments from card */ | 671 | /* Get DMA destination and size arguments from card */ |
672 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA, data); | 672 | ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA, 7, data); |
673 | IVTV_DEBUG_HI_IRQ("ENC START CAP %d: %08x %08x\n", data[0], data[1], data[2]); | 673 | IVTV_DEBUG_HI_IRQ("ENC START CAP %d: %08x %08x\n", data[0], data[1], data[2]); |
674 | 674 | ||
675 | if (data[0] > 2 || data[1] == 0 || data[2] == 0) { | 675 | if (data[0] > 2 || data[1] == 0 || data[2] == 0) { |
@@ -713,9 +713,9 @@ static void ivtv_irq_dec_data_req(struct ivtv *itv) | |||
713 | struct ivtv_stream *s; | 713 | struct ivtv_stream *s; |
714 | 714 | ||
715 | /* YUV or MPG */ | 715 | /* YUV or MPG */ |
716 | ivtv_api_get_data(&itv->dec_mbox, IVTV_MBOX_DMA, data); | ||
717 | 716 | ||
718 | if (test_bit(IVTV_F_I_DEC_YUV, &itv->i_flags)) { | 717 | if (test_bit(IVTV_F_I_DEC_YUV, &itv->i_flags)) { |
718 | ivtv_api_get_data(&itv->dec_mbox, IVTV_MBOX_DMA, 2, data); | ||
719 | itv->dma_data_req_size = | 719 | itv->dma_data_req_size = |
720 | 1080 * ((itv->yuv_info.v4l2_src_h + 31) & ~31); | 720 | 1080 * ((itv->yuv_info.v4l2_src_h + 31) & ~31); |
721 | itv->dma_data_req_offset = data[1]; | 721 | itv->dma_data_req_offset = data[1]; |
@@ -724,6 +724,7 @@ static void ivtv_irq_dec_data_req(struct ivtv *itv) | |||
724 | s = &itv->streams[IVTV_DEC_STREAM_TYPE_YUV]; | 724 | s = &itv->streams[IVTV_DEC_STREAM_TYPE_YUV]; |
725 | } | 725 | } |
726 | else { | 726 | else { |
727 | ivtv_api_get_data(&itv->dec_mbox, IVTV_MBOX_DMA, 3, data); | ||
727 | itv->dma_data_req_size = min_t(u32, data[2], 0x10000); | 728 | itv->dma_data_req_size = min_t(u32, data[2], 0x10000); |
728 | itv->dma_data_req_offset = data[1]; | 729 | itv->dma_data_req_offset = data[1]; |
729 | s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; | 730 | s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; |
@@ -940,9 +941,10 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id) | |||
940 | ivtv_dma_enc_start(s); | 941 | ivtv_dma_enc_start(s); |
941 | break; | 942 | break; |
942 | } | 943 | } |
943 | if (i == IVTV_MAX_STREAMS && test_and_clear_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags)) { | 944 | |
945 | if (i == IVTV_MAX_STREAMS && | ||
946 | test_bit(IVTV_F_I_UDMA_PENDING, &itv->i_flags)) | ||
944 | ivtv_udma_start(itv); | 947 | ivtv_udma_start(itv); |
945 | } | ||
946 | } | 948 | } |
947 | 949 | ||
948 | if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_PIO, &itv->i_flags)) { | 950 | if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_PIO, &itv->i_flags)) { |