diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-04-17 06:06:06 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 14:05:42 -0300 |
commit | a00e68888d5d2b583b13d7d58204a27207af95fd (patch) | |
tree | 61ffdf58d27c8e2f6bd5a69e989bbf5742a3e3c3 /drivers/media/pci/saa7134/saa7134-vbi.c | |
parent | 5c44046da9e638cd7d8def8a9c8454f4d9ce8435 (diff) | |
download | linux-a00e68888d5d2b583b13d7d58204a27207af95fd.tar.bz2 |
[media] saa7134: move saa7134_pgtable to saa7134_dmaqueue
All dmaqueue's use saa7134_pgtable, so move it into struct saa7134_dmaqueue.
The videobuf_queue priv_data field now points to the dmaqueue struct.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/pci/saa7134/saa7134-vbi.c')
-rw-r--r-- | drivers/media/pci/saa7134/saa7134-vbi.c | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index 7f285633529b..4954a5483299 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -96,7 +96,7 @@ static int buffer_activate(struct saa7134_dev *dev, base = saa7134_buffer_base(buf); control = SAA7134_RS_CONTROL_BURST_16 | SAA7134_RS_CONTROL_ME | - (buf->pt->dma >> 12); + (dev->vbi_q.pt.dma >> 12); saa_writel(SAA7134_RS_BA1(2), base); saa_writel(SAA7134_RS_BA2(2), base + dev->vbi_hlen * dev->vbi_vlen); saa_writel(SAA7134_RS_PITCH(2), dev->vbi_hlen); @@ -117,7 +117,8 @@ static int buffer_prepare(struct videobuf_queue *q, struct videobuf_buffer *vb, enum v4l2_field field) { - struct saa7134_dev *dev = q->priv_data; + struct saa7134_dmaqueue *dmaq = q->priv_data; + struct saa7134_dev *dev = dmaq->dev; struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); unsigned int size; int err; @@ -135,12 +136,11 @@ static int buffer_prepare(struct videobuf_queue *q, buf->vb.width = dev->vbi_hlen; buf->vb.height = dev->vbi_vlen; buf->vb.size = size; - buf->pt = &dev->pt_vbi; err = videobuf_iolock(q,&buf->vb,NULL); if (err) goto oops; - err = saa7134_pgtable_build(dev->pci,buf->pt, + err = saa7134_pgtable_build(dev->pci, &dmaq->pt, dma->sglist, dma->sglen, saa7134_buffer_startpage(buf)); @@ -160,7 +160,8 @@ static int buffer_prepare(struct videobuf_queue *q, static int buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) { - struct saa7134_dev *dev = q->priv_data; + struct saa7134_dmaqueue *dmaq = q->priv_data; + struct saa7134_dev *dev = dmaq->dev; dev->vbi_vlen = dev->tvnorm->vbi_v_stop_0 - dev->tvnorm->vbi_v_start_0 + 1; if (dev->vbi_vlen > VBI_LINE_COUNT) @@ -175,7 +176,8 @@ buffer_setup(struct videobuf_queue *q, unsigned int *count, unsigned int *size) static void buffer_queue(struct videobuf_queue *q, struct videobuf_buffer *vb) { - struct saa7134_dev *dev = q->priv_data; + struct saa7134_dmaqueue *dmaq = q->priv_data; + struct saa7134_dev *dev = dmaq->dev; struct saa7134_buf *buf = container_of(vb,struct saa7134_buf,vb); saa7134_buffer_queue(dev,&dev->vbi_q,buf); |