summaryrefslogtreecommitdiff
path: root/drivers/media
diff options
context:
space:
mode:
authorEzequiel Garcia <ezequiel@collabora.com>2018-05-19 00:07:48 +0300
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>2018-05-28 23:21:41 +0300
commit636757ab6c93e19e2f58d3b3af1312e34eaffbab (patch)
treefe99c6548360a0e06153c1d001a8c639e907d7f0 /drivers/media
parent9e73d231b895b6c44279b9d5cb72b7101a9d2fc3 (diff)
downloadlinux-636757ab6c93e19e2f58d3b3af1312e34eaffbab.tar.xz
media: tw686x: Fix incorrect vb2_mem_ops GFP flags
When the driver is configured in the "memcpy" dma-mode, it uses vb2_vmalloc_memops, which is backed by a SLAB allocator and so shouldn't be using GFP_DMA32. Fix it. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/pci/tw686x/tw686x-video.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
index c3fafa97b2d0..0ea8dd44026c 100644
--- a/drivers/media/pci/tw686x/tw686x-video.c
+++ b/drivers/media/pci/tw686x/tw686x-video.c
@@ -1228,7 +1228,8 @@ int tw686x_video_init(struct tw686x_dev *dev)
vc->vidq.timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC;
vc->vidq.min_buffers_needed = 2;
vc->vidq.lock = &vc->vb_mutex;
- vc->vidq.gfp_flags = GFP_DMA32;
+ vc->vidq.gfp_flags = dev->dma_mode != TW686X_DMA_MODE_MEMCPY ?
+ GFP_DMA32 : 0;
vc->vidq.dev = &dev->pci_dev->dev;
err = vb2_queue_init(&vc->vidq);