diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-08-23 15:37:49 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-10-09 21:14:55 -0400 |
commit | c1accaa21bdef38ec0f36eaaf7ce3384fff9d0c5 (patch) | |
tree | 3a2c8206555af6c9e2eecdb20b052be70e6b93dd /drivers/media/video/bt8xx/bttv-risc.c | |
parent | 7a7d9a89d0307b1743d782197e2c5fc5ddf183f3 (diff) |
V4L/DVB (6252): Adapt drivers to use the newer videobuf modules
PCI-dependent videobuf_foo methods were renamed as videobuf_pci_foo.
Also, videobuf_dmabuf is now part of videobuf-dma-sg private struct.
So, to access it, a subroutine call is needed.
This patch renames all occurences of those function calls to be
consistent with the video-buf split.
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
http://thread.gmane.org/gmane.comp.video.video4linux/34978/focus=34981
Reviewed-by: Ricardo Cerqueira <v4l@cerqueira.org>
Diffstat (limited to 'drivers/media/video/bt8xx/bttv-risc.c')
-rw-r--r-- | drivers/media/video/bt8xx/bttv-risc.c | 35 |
1 files changed, 19 insertions, 16 deletions
diff --git a/drivers/media/video/bt8xx/bttv-risc.c b/drivers/media/video/bt8xx/bttv-risc.c index e7104d9cb4bd..58986f1a5f1a 100644 --- a/drivers/media/video/bt8xx/bttv-risc.c +++ b/drivers/media/video/bt8xx/bttv-risc.c | |||
@@ -574,10 +574,12 @@ bttv_risc_hook(struct bttv *btv, int slot, struct btcx_riscmem *risc, | |||
574 | void | 574 | void |
575 | bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf) | 575 | bttv_dma_free(struct videobuf_queue *q,struct bttv *btv, struct bttv_buffer *buf) |
576 | { | 576 | { |
577 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); | ||
578 | |||
577 | BUG_ON(in_interrupt()); | 579 | BUG_ON(in_interrupt()); |
578 | videobuf_waiton(&buf->vb,0,0); | 580 | videobuf_waiton(&buf->vb,0,0); |
579 | videobuf_dma_unmap(q, &buf->vb.dma); | 581 | videobuf_dma_unmap(q, dma); |
580 | videobuf_dma_free(&buf->vb.dma); | 582 | videobuf_dma_free(dma); |
581 | btcx_riscmem_free(btv->c.pci,&buf->bottom); | 583 | btcx_riscmem_free(btv->c.pci,&buf->bottom); |
582 | btcx_riscmem_free(btv->c.pci,&buf->top); | 584 | btcx_riscmem_free(btv->c.pci,&buf->top); |
583 | buf->vb.state = STATE_NEEDS_INIT; | 585 | buf->vb.state = STATE_NEEDS_INIT; |
@@ -699,6 +701,7 @@ int | |||
699 | bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | 701 | bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) |
700 | { | 702 | { |
701 | const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; | 703 | const struct bttv_tvnorm *tvnorm = bttv_tvnorms + buf->tvnorm; |
704 | struct videobuf_dmabuf *dma=videobuf_to_dma(&buf->vb); | ||
702 | 705 | ||
703 | dprintk(KERN_DEBUG | 706 | dprintk(KERN_DEBUG |
704 | "bttv%d: buffer field: %s format: %s size: %dx%d\n", | 707 | "bttv%d: buffer field: %s format: %s size: %dx%d\n", |
@@ -716,25 +719,25 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
716 | 719 | ||
717 | switch (buf->vb.field) { | 720 | switch (buf->vb.field) { |
718 | case V4L2_FIELD_TOP: | 721 | case V4L2_FIELD_TOP: |
719 | bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist, | 722 | bttv_risc_packed(btv,&buf->top,dma->sglist, |
720 | /* offset */ 0,bpl, | 723 | /* offset */ 0,bpl, |
721 | /* padding */ 0,/* skip_lines */ 0, | 724 | /* padding */ 0,/* skip_lines */ 0, |
722 | buf->vb.height); | 725 | buf->vb.height); |
723 | break; | 726 | break; |
724 | case V4L2_FIELD_BOTTOM: | 727 | case V4L2_FIELD_BOTTOM: |
725 | bttv_risc_packed(btv,&buf->bottom,buf->vb.dma.sglist, | 728 | bttv_risc_packed(btv,&buf->bottom,dma->sglist, |
726 | 0,bpl,0,0,buf->vb.height); | 729 | 0,bpl,0,0,buf->vb.height); |
727 | break; | 730 | break; |
728 | case V4L2_FIELD_INTERLACED: | 731 | case V4L2_FIELD_INTERLACED: |
729 | bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist, | 732 | bttv_risc_packed(btv,&buf->top,dma->sglist, |
730 | 0,bpl,bpl,0,buf->vb.height >> 1); | 733 | 0,bpl,bpl,0,buf->vb.height >> 1); |
731 | bttv_risc_packed(btv,&buf->bottom,buf->vb.dma.sglist, | 734 | bttv_risc_packed(btv,&buf->bottom,dma->sglist, |
732 | bpl,bpl,bpl,0,buf->vb.height >> 1); | 735 | bpl,bpl,bpl,0,buf->vb.height >> 1); |
733 | break; | 736 | break; |
734 | case V4L2_FIELD_SEQ_TB: | 737 | case V4L2_FIELD_SEQ_TB: |
735 | bttv_risc_packed(btv,&buf->top,buf->vb.dma.sglist, | 738 | bttv_risc_packed(btv,&buf->top,dma->sglist, |
736 | 0,bpl,0,0,buf->vb.height >> 1); | 739 | 0,bpl,0,0,buf->vb.height >> 1); |
737 | bttv_risc_packed(btv,&buf->bottom,buf->vb.dma.sglist, | 740 | bttv_risc_packed(btv,&buf->bottom,dma->sglist, |
738 | bpf,bpl,0,0,buf->vb.height >> 1); | 741 | bpf,bpl,0,0,buf->vb.height >> 1); |
739 | break; | 742 | break; |
740 | default: | 743 | default: |
@@ -767,7 +770,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
767 | bttv_calc_geo(btv,&buf->geo,buf->vb.width, | 770 | bttv_calc_geo(btv,&buf->geo,buf->vb.width, |
768 | buf->vb.height,/* both_fields */ 0, | 771 | buf->vb.height,/* both_fields */ 0, |
769 | tvnorm,&buf->crop); | 772 | tvnorm,&buf->crop); |
770 | bttv_risc_planar(btv, &buf->top, buf->vb.dma.sglist, | 773 | bttv_risc_planar(btv, &buf->top, dma->sglist, |
771 | 0,buf->vb.width,0,buf->vb.height, | 774 | 0,buf->vb.width,0,buf->vb.height, |
772 | uoffset,voffset,buf->fmt->hshift, | 775 | uoffset,voffset,buf->fmt->hshift, |
773 | buf->fmt->vshift,0); | 776 | buf->fmt->vshift,0); |
@@ -776,7 +779,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
776 | bttv_calc_geo(btv,&buf->geo,buf->vb.width, | 779 | bttv_calc_geo(btv,&buf->geo,buf->vb.width, |
777 | buf->vb.height,0, | 780 | buf->vb.height,0, |
778 | tvnorm,&buf->crop); | 781 | tvnorm,&buf->crop); |
779 | bttv_risc_planar(btv, &buf->bottom, buf->vb.dma.sglist, | 782 | bttv_risc_planar(btv, &buf->bottom, dma->sglist, |
780 | 0,buf->vb.width,0,buf->vb.height, | 783 | 0,buf->vb.width,0,buf->vb.height, |
781 | uoffset,voffset,buf->fmt->hshift, | 784 | uoffset,voffset,buf->fmt->hshift, |
782 | buf->fmt->vshift,0); | 785 | buf->fmt->vshift,0); |
@@ -789,14 +792,14 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
789 | ypadding = buf->vb.width; | 792 | ypadding = buf->vb.width; |
790 | cpadding = buf->vb.width >> buf->fmt->hshift; | 793 | cpadding = buf->vb.width >> buf->fmt->hshift; |
791 | bttv_risc_planar(btv,&buf->top, | 794 | bttv_risc_planar(btv,&buf->top, |
792 | buf->vb.dma.sglist, | 795 | dma->sglist, |
793 | 0,buf->vb.width,ypadding,lines, | 796 | 0,buf->vb.width,ypadding,lines, |
794 | uoffset,voffset, | 797 | uoffset,voffset, |
795 | buf->fmt->hshift, | 798 | buf->fmt->hshift, |
796 | buf->fmt->vshift, | 799 | buf->fmt->vshift, |
797 | cpadding); | 800 | cpadding); |
798 | bttv_risc_planar(btv,&buf->bottom, | 801 | bttv_risc_planar(btv,&buf->bottom, |
799 | buf->vb.dma.sglist, | 802 | dma->sglist, |
800 | ypadding,buf->vb.width,ypadding,lines, | 803 | ypadding,buf->vb.width,ypadding,lines, |
801 | uoffset+cpadding, | 804 | uoffset+cpadding, |
802 | voffset+cpadding, | 805 | voffset+cpadding, |
@@ -812,7 +815,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
812 | ypadding = buf->vb.width; | 815 | ypadding = buf->vb.width; |
813 | cpadding = buf->vb.width >> buf->fmt->hshift; | 816 | cpadding = buf->vb.width >> buf->fmt->hshift; |
814 | bttv_risc_planar(btv,&buf->top, | 817 | bttv_risc_planar(btv,&buf->top, |
815 | buf->vb.dma.sglist, | 818 | dma->sglist, |
816 | 0,buf->vb.width,0,lines, | 819 | 0,buf->vb.width,0,lines, |
817 | uoffset >> 1, | 820 | uoffset >> 1, |
818 | voffset >> 1, | 821 | voffset >> 1, |
@@ -820,7 +823,7 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
820 | buf->fmt->vshift, | 823 | buf->fmt->vshift, |
821 | 0); | 824 | 0); |
822 | bttv_risc_planar(btv,&buf->bottom, | 825 | bttv_risc_planar(btv,&buf->bottom, |
823 | buf->vb.dma.sglist, | 826 | dma->sglist, |
824 | lines * ypadding,buf->vb.width,0,lines, | 827 | lines * ypadding,buf->vb.width,0,lines, |
825 | lines * ypadding + (uoffset >> 1), | 828 | lines * ypadding + (uoffset >> 1), |
826 | lines * ypadding + (voffset >> 1), | 829 | lines * ypadding + (voffset >> 1), |
@@ -839,10 +842,10 @@ bttv_buffer_risc(struct bttv *btv, struct bttv_buffer *buf) | |||
839 | buf->vb.field = V4L2_FIELD_SEQ_TB; | 842 | buf->vb.field = V4L2_FIELD_SEQ_TB; |
840 | bttv_calc_geo(btv,&buf->geo,tvnorm->swidth,tvnorm->sheight, | 843 | bttv_calc_geo(btv,&buf->geo,tvnorm->swidth,tvnorm->sheight, |
841 | 1,tvnorm,&buf->crop); | 844 | 1,tvnorm,&buf->crop); |
842 | bttv_risc_packed(btv, &buf->top, buf->vb.dma.sglist, | 845 | bttv_risc_packed(btv, &buf->top, dma->sglist, |
843 | /* offset */ 0, RAW_BPL, /* padding */ 0, | 846 | /* offset */ 0, RAW_BPL, /* padding */ 0, |
844 | /* skip_lines */ 0, RAW_LINES); | 847 | /* skip_lines */ 0, RAW_LINES); |
845 | bttv_risc_packed(btv, &buf->bottom, buf->vb.dma.sglist, | 848 | bttv_risc_packed(btv, &buf->bottom, dma->sglist, |
846 | buf->vb.size/2 , RAW_BPL, 0, 0, RAW_LINES); | 849 | buf->vb.size/2 , RAW_BPL, 0, 0, RAW_LINES); |
847 | } | 850 | } |
848 | 851 | ||