aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/ivtv/ivtv-irq.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-irq.c')
-rw-r--r--drivers/media/video/ivtv/ivtv-irq.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/drivers/media/video/ivtv/ivtv-irq.c b/drivers/media/video/ivtv/ivtv-irq.c
index ba98bf054f2e..1a3ee464a826 100644
--- a/drivers/media/video/ivtv/ivtv-irq.c
+++ b/drivers/media/video/ivtv/ivtv-irq.c
@@ -48,7 +48,7 @@ static void ivtv_pio_work_handler(struct ivtv *itv)
48 struct list_head *p; 48 struct list_head *p;
49 int i = 0; 49 int i = 0;
50 50
51 IVTV_DEBUG_DMA("ivtv_pio_work_handler\n"); 51 IVTV_DEBUG_HI_DMA("ivtv_pio_work_handler\n");
52 if (itv->cur_pio_stream < 0 || itv->cur_pio_stream >= IVTV_MAX_STREAMS || 52 if (itv->cur_pio_stream < 0 || itv->cur_pio_stream >= IVTV_MAX_STREAMS ||
53 s->v4l2dev == NULL || !ivtv_use_pio(s)) { 53 s->v4l2dev == NULL || !ivtv_use_pio(s)) {
54 itv->cur_pio_stream = -1; 54 itv->cur_pio_stream = -1;
@@ -56,7 +56,7 @@ static void ivtv_pio_work_handler(struct ivtv *itv)
56 write_reg(IVTV_IRQ_ENC_PIO_COMPLETE, 0x44); 56 write_reg(IVTV_IRQ_ENC_PIO_COMPLETE, 0x44);
57 return; 57 return;
58 } 58 }
59 IVTV_DEBUG_DMA("Process PIO %s\n", s->name); 59 IVTV_DEBUG_HI_DMA("Process PIO %s\n", s->name);
60 buf = list_entry(s->q_dma.list.next, struct ivtv_buffer, list); 60 buf = list_entry(s->q_dma.list.next, struct ivtv_buffer, list);
61 list_for_each(p, &s->q_dma.list) { 61 list_for_each(p, &s->q_dma.list) {
62 struct ivtv_buffer *buf = list_entry(p, struct ivtv_buffer, list); 62 struct ivtv_buffer *buf = list_entry(p, struct ivtv_buffer, list);
@@ -187,7 +187,7 @@ static int stream_enc_dma_append(struct ivtv_stream *s, u32 data[CX2341X_MBOX_MA
187 bytes_needed += UVsize; 187 bytes_needed += UVsize;
188 } 188 }
189 189
190 IVTV_DEBUG_DMA("%s %s: 0x%08x bytes at 0x%08x\n", 190 IVTV_DEBUG_HI_DMA("%s %s: 0x%08x bytes at 0x%08x\n",
191 ivtv_use_pio(s) ? "PIO" : "DMA", s->name, bytes_needed, offset); 191 ivtv_use_pio(s) ? "PIO" : "DMA", s->name, bytes_needed, offset);
192 192
193 rc = ivtv_queue_move(s, &s->q_free, &s->q_full, &s->q_predma, bytes_needed); 193 rc = ivtv_queue_move(s, &s->q_free, &s->q_full, &s->q_predma, bytes_needed);
@@ -242,7 +242,7 @@ static void dma_post(struct ivtv_stream *s)
242 u32 *u32buf; 242 u32 *u32buf;
243 int x = 0; 243 int x = 0;
244 244
245 IVTV_DEBUG_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA", 245 IVTV_DEBUG_HI_DMA("%s %s completed (%x)\n", ivtv_use_pio(s) ? "PIO" : "DMA",
246 s->name, s->dma_offset); 246 s->name, s->dma_offset);
247 list_for_each(p, &s->q_dma.list) { 247 list_for_each(p, &s->q_dma.list) {
248 buf = list_entry(p, struct ivtv_buffer, list); 248 buf = list_entry(p, struct ivtv_buffer, list);
@@ -321,7 +321,7 @@ void ivtv_dma_stream_dec_prepare(struct ivtv_stream *s, u32 offset, int lock)
321 unsigned long flags = 0; 321 unsigned long flags = 0;
322 int idx = 0; 322 int idx = 0;
323 323
324 IVTV_DEBUG_DMA("DEC PREPARE DMA %s: %08x %08x\n", s->name, s->q_predma.bytesused, offset); 324 IVTV_DEBUG_HI_DMA("DEC PREPARE DMA %s: %08x %08x\n", s->name, s->q_predma.bytesused, offset);
325 buf = list_entry(s->q_predma.list.next, struct ivtv_buffer, list); 325 buf = list_entry(s->q_predma.list.next, struct ivtv_buffer, list);
326 list_for_each(p, &s->q_predma.list) { 326 list_for_each(p, &s->q_predma.list) {
327 struct ivtv_buffer *buf = list_entry(p, struct ivtv_buffer, list); 327 struct ivtv_buffer *buf = list_entry(p, struct ivtv_buffer, list);
@@ -368,7 +368,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s)
368 struct ivtv_stream *s_vbi = &itv->streams[IVTV_ENC_STREAM_TYPE_VBI]; 368 struct ivtv_stream *s_vbi = &itv->streams[IVTV_ENC_STREAM_TYPE_VBI];
369 int i; 369 int i;
370 370
371 IVTV_DEBUG_DMA("start %s for %s\n", ivtv_use_dma(s) ? "DMA" : "PIO", s->name); 371 IVTV_DEBUG_HI_DMA("start %s for %s\n", ivtv_use_dma(s) ? "DMA" : "PIO", s->name);
372 372
373 if (s->q_predma.bytesused) 373 if (s->q_predma.bytesused)
374 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); 374 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused);
@@ -397,7 +397,7 @@ static void ivtv_dma_enc_start(struct ivtv_stream *s)
397 itv->vbi.dma_offset = s_vbi->dma_offset; 397 itv->vbi.dma_offset = s_vbi->dma_offset;
398 s_vbi->SG_length = 0; 398 s_vbi->SG_length = 0;
399 set_bit(IVTV_F_S_DMA_HAS_VBI, &s->s_flags); 399 set_bit(IVTV_F_S_DMA_HAS_VBI, &s->s_flags);
400 IVTV_DEBUG_DMA("include DMA for %s\n", s->name); 400 IVTV_DEBUG_HI_DMA("include DMA for %s\n", s->name);
401 } 401 }
402 402
403 /* Mark last buffer size for Interrupt flag */ 403 /* Mark last buffer size for Interrupt flag */
@@ -431,7 +431,7 @@ static void ivtv_dma_dec_start(struct ivtv_stream *s)
431 431
432 if (s->q_predma.bytesused) 432 if (s->q_predma.bytesused)
433 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused); 433 ivtv_queue_move(s, &s->q_predma, NULL, &s->q_dma, s->q_predma.bytesused);
434 IVTV_DEBUG_DMA("start DMA for %s\n", s->name); 434 IVTV_DEBUG_HI_DMA("start DMA for %s\n", s->name);
435 /* put SG Handle into register 0x0c */ 435 /* put SG Handle into register 0x0c */
436 write_reg(s->SG_handle, IVTV_REG_DECDMAADDR); 436 write_reg(s->SG_handle, IVTV_REG_DECDMAADDR);
437 write_reg_sync(read_reg(IVTV_REG_DMAXFER) | 0x01, IVTV_REG_DMAXFER); 437 write_reg_sync(read_reg(IVTV_REG_DMAXFER) | 0x01, IVTV_REG_DMAXFER);
@@ -447,7 +447,7 @@ static void ivtv_irq_dma_read(struct ivtv *itv)
447 struct ivtv_buffer *buf; 447 struct ivtv_buffer *buf;
448 int hw_stream_type; 448 int hw_stream_type;
449 449
450 IVTV_DEBUG_IRQ("DEC DMA READ\n"); 450 IVTV_DEBUG_HI_IRQ("DEC DMA READ\n");
451 del_timer(&itv->dma_timer); 451 del_timer(&itv->dma_timer);
452 if (read_reg(IVTV_REG_DMASTATUS) & 0x14) { 452 if (read_reg(IVTV_REG_DMASTATUS) & 0x14) {
453 IVTV_DEBUG_WARN("DEC DMA ERROR %x\n", read_reg(IVTV_REG_DMASTATUS)); 453 IVTV_DEBUG_WARN("DEC DMA ERROR %x\n", read_reg(IVTV_REG_DMASTATUS));
@@ -462,7 +462,7 @@ static void ivtv_irq_dma_read(struct ivtv *itv)
462 s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; 462 s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG];
463 hw_stream_type = 0; 463 hw_stream_type = 0;
464 } 464 }
465 IVTV_DEBUG_DMA("DEC DATA READ %s: %d\n", s->name, s->q_dma.bytesused); 465 IVTV_DEBUG_HI_DMA("DEC DATA READ %s: %d\n", s->name, s->q_dma.bytesused);
466 466
467 ivtv_stream_sync_for_cpu(s); 467 ivtv_stream_sync_for_cpu(s);
468 468
@@ -495,7 +495,7 @@ static void ivtv_irq_enc_dma_complete(struct ivtv *itv)
495 495
496 del_timer(&itv->dma_timer); 496 del_timer(&itv->dma_timer);
497 ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, data); 497 ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA_END, data);
498 IVTV_DEBUG_IRQ("ENC DMA COMPLETE %x %d\n", data[0], data[1]); 498 IVTV_DEBUG_HI_IRQ("ENC DMA COMPLETE %x %d\n", data[0], data[1]);
499 if (test_and_clear_bit(IVTV_F_I_ENC_VBI, &itv->i_flags)) 499 if (test_and_clear_bit(IVTV_F_I_ENC_VBI, &itv->i_flags))
500 data[1] = 3; 500 data[1] = 3;
501 else if (data[1] > 2) 501 else if (data[1] > 2)
@@ -532,7 +532,7 @@ static void ivtv_irq_enc_pio_complete(struct ivtv *itv)
532 return; 532 return;
533 } 533 }
534 s = &itv->streams[itv->cur_pio_stream]; 534 s = &itv->streams[itv->cur_pio_stream];
535 IVTV_DEBUG_IRQ("ENC PIO COMPLETE %s\n", s->name); 535 IVTV_DEBUG_HI_IRQ("ENC PIO COMPLETE %s\n", s->name);
536 s->SG_length = 0; 536 s->SG_length = 0;
537 clear_bit(IVTV_F_I_ENC_VBI, &itv->i_flags); 537 clear_bit(IVTV_F_I_ENC_VBI, &itv->i_flags);
538 clear_bit(IVTV_F_I_PIO, &itv->i_flags); 538 clear_bit(IVTV_F_I_PIO, &itv->i_flags);
@@ -590,7 +590,7 @@ static void ivtv_irq_enc_start_cap(struct ivtv *itv)
590 590
591 /* Get DMA destination and size arguments from card */ 591 /* Get DMA destination and size arguments from card */
592 ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA, data); 592 ivtv_api_get_data(&itv->enc_mbox, IVTV_MBOX_DMA, data);
593 IVTV_DEBUG_IRQ("ENC START CAP %d: %08x %08x\n", data[0], data[1], data[2]); 593 IVTV_DEBUG_HI_IRQ("ENC START CAP %d: %08x %08x\n", data[0], data[1], data[2]);
594 594
595 if (data[0] > 2 || data[1] == 0 || data[2] == 0) { 595 if (data[0] > 2 || data[1] == 0 || data[2] == 0) {
596 IVTV_DEBUG_WARN("Unknown input: %08x %08x %08x\n", 596 IVTV_DEBUG_WARN("Unknown input: %08x %08x %08x\n",
@@ -610,7 +610,7 @@ static void ivtv_irq_enc_vbi_cap(struct ivtv *itv)
610 u32 data[CX2341X_MBOX_MAX_DATA]; 610 u32 data[CX2341X_MBOX_MAX_DATA];
611 struct ivtv_stream *s; 611 struct ivtv_stream *s;
612 612
613 IVTV_DEBUG_IRQ("ENC START VBI CAP\n"); 613 IVTV_DEBUG_HI_IRQ("ENC START VBI CAP\n");
614 s = &itv->streams[IVTV_ENC_STREAM_TYPE_VBI]; 614 s = &itv->streams[IVTV_ENC_STREAM_TYPE_VBI];
615 615
616 /* If more than two VBI buffers are pending, then 616 /* If more than two VBI buffers are pending, then
@@ -644,7 +644,7 @@ static void ivtv_irq_dec_vbi_reinsert(struct ivtv *itv)
644 u32 data[CX2341X_MBOX_MAX_DATA]; 644 u32 data[CX2341X_MBOX_MAX_DATA];
645 struct ivtv_stream *s = &itv->streams[IVTV_DEC_STREAM_TYPE_VBI]; 645 struct ivtv_stream *s = &itv->streams[IVTV_DEC_STREAM_TYPE_VBI];
646 646
647 IVTV_DEBUG_IRQ("DEC VBI REINSERT\n"); 647 IVTV_DEBUG_HI_IRQ("DEC VBI REINSERT\n");
648 if (test_bit(IVTV_F_S_CLAIMED, &s->s_flags) && 648 if (test_bit(IVTV_F_S_CLAIMED, &s->s_flags) &&
649 !stream_enc_dma_append(s, data)) { 649 !stream_enc_dma_append(s, data)) {
650 set_bit(IVTV_F_S_PIO_PENDING, &s->s_flags); 650 set_bit(IVTV_F_S_PIO_PENDING, &s->s_flags);
@@ -669,7 +669,7 @@ static void ivtv_irq_dec_data_req(struct ivtv *itv)
669 itv->dma_data_req_offset = data[1]; 669 itv->dma_data_req_offset = data[1];
670 s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG]; 670 s = &itv->streams[IVTV_DEC_STREAM_TYPE_MPG];
671 } 671 }
672 IVTV_DEBUG_IRQ("DEC DATA REQ %s: %d %08x %u\n", s->name, s->q_full.bytesused, 672 IVTV_DEBUG_HI_IRQ("DEC DATA REQ %s: %d %08x %u\n", s->name, s->q_full.bytesused,
673 itv->dma_data_req_offset, itv->dma_data_req_size); 673 itv->dma_data_req_offset, itv->dma_data_req_size);
674 if (itv->dma_data_req_size == 0 || s->q_full.bytesused < itv->dma_data_req_size) { 674 if (itv->dma_data_req_size == 0 || s->q_full.bytesused < itv->dma_data_req_size) {
675 set_bit(IVTV_F_S_NEEDS_DATA, &s->s_flags); 675 set_bit(IVTV_F_S_NEEDS_DATA, &s->s_flags);
@@ -791,10 +791,10 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id)
791 /* Exclude interrupts noted below from the output, otherwise the log is flooded with 791 /* Exclude interrupts noted below from the output, otherwise the log is flooded with
792 these messages */ 792 these messages */
793 if (combo & ~0xff6d0400) 793 if (combo & ~0xff6d0400)
794 IVTV_DEBUG_IRQ("======= valid IRQ bits: 0x%08x ======\n", combo); 794 IVTV_DEBUG_HI_IRQ("======= valid IRQ bits: 0x%08x ======\n", combo);
795 795
796 if (combo & IVTV_IRQ_DEC_DMA_COMPLETE) { 796 if (combo & IVTV_IRQ_DEC_DMA_COMPLETE) {
797 IVTV_DEBUG_IRQ("DEC DMA COMPLETE\n"); 797 IVTV_DEBUG_HI_IRQ("DEC DMA COMPLETE\n");
798 } 798 }
799 799
800 if (combo & IVTV_IRQ_DMA_READ) { 800 if (combo & IVTV_IRQ_DMA_READ) {