Skip to content

Commit

Permalink
[media] tw686x: Specify that the DMA is 32 bits
Browse files Browse the repository at this point in the history
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 <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
ezequielgarcia authored and mchehab committed Apr 20, 2016
1 parent e3a900a commit 1c9f471
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions drivers/media/pci/tw686x/tw686x-video.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 1c9f471

Please sign in to comment.