diff mbox

[1/7] tw686x: Specify that the DMA is 32 bits

Message ID 1459550307-688-2-git-send-email-ezequiel@vanguardiasur.com.ar (mailing list archive)
State New, archived
Headers show

Commit Message

Ezequiel Garcia April 1, 2016, 10:38 p.m. UTC
Set vb2_queue.gfp_flags to GFP_DMA32. Otherwise it will start to
create bounce buffers which is something you want to avoid since
those are in limited supply.

Without this patch, DMA scatter-gather may not work because
machines can ran out of buffers easily.

Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
--
Hans,

Feel free to squash this patch into the previous patch,
or to apply it independently.

Thanks,
Ezequiel
---
 drivers/media/pci/tw686x/tw686x-video.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox

Patch

diff --git a/drivers/media/pci/tw686x/tw686x-video.c b/drivers/media/pci/tw686x/tw686x-video.c
index a3505aa66b77..19a348fe04e3 100644
--- a/drivers/media/pci/tw686x/tw686x-video.c
+++ b/drivers/media/pci/tw686x/tw686x-video.c
@@ -848,6 +848,7 @@  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;
 
 		err = vb2_queue_init(&vc->vidq);
 		if (err) {