diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-12-08 17:23:49 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@osg.samsung.com> | 2014-12-17 02:21:40 +0100 |
commit | 165d00439fa9e9da7f263dc844cbd524cf624074 (patch) | |
tree | 341fb85627d841edcc93175f12c3247ab40b444a /drivers/media/pci/cx88/cx88-dvb.c | |
parent | [media] v4l2-ioctl: WARN_ON if querycap didn't fill device_caps (diff) | |
download | linux-165d00439fa9e9da7f263dc844cbd524cf624074.tar.xz linux-165d00439fa9e9da7f263dc844cbd524cf624074.zip |
[media] cx88: add missing alloc_ctx support
The cx88 vb2 conversion and the vb2 dma_sg improvements were developed separately and
were merged separately. Unfortunately, the patch updating drivers to the dma_sg
improvements didn't take the updated cx88 driver into account. Basically two ships
passing in the night, unaware of one another even though both ships have the same
owner, i.e. me :-)
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Reported-by: Chris Lee <updatelee@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/pci/cx88/cx88-dvb.c')
-rw-r--r-- | drivers/media/pci/cx88/cx88-dvb.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/media/pci/cx88/cx88-dvb.c b/drivers/media/pci/cx88/cx88-dvb.c index c344bfd0b896..5780e2f013b4 100644 --- a/drivers/media/pci/cx88/cx88-dvb.c +++ b/drivers/media/pci/cx88/cx88-dvb.c @@ -92,6 +92,7 @@ static int queue_setup(struct vb2_queue *q, const struct v4l2_format *fmt, dev->ts_packet_size = 188 * 4; dev->ts_packet_count = dvb_buf_tscnt; sizes[0] = dev->ts_packet_size * dev->ts_packet_count; + alloc_ctxs[0] = dev->alloc_ctx; *num_buffers = dvb_buf_tscnt; return 0; } @@ -108,14 +109,11 @@ static void buffer_finish(struct vb2_buffer *vb) { struct cx8802_dev *dev = vb->vb2_queue->drv_priv; struct cx88_buffer *buf = container_of(vb, struct cx88_buffer, vb); - struct sg_table *sgt = vb2_dma_sg_plane_desc(vb, 0); struct cx88_riscmem *risc = &buf->risc; if (risc->cpu) pci_free_consistent(dev->pci, risc->size, risc->cpu, risc->dma); memset(risc, 0, sizeof(*risc)); - - dma_unmap_sg(&dev->pci->dev, sgt->sgl, sgt->nents, DMA_FROM_DEVICE); } static void buffer_queue(struct vb2_buffer *vb) |