diff options
author | Hans Verkuil <hans.verkuil@cisco.com> | 2014-04-17 06:44:31 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <m.chehab@samsung.com> | 2014-05-23 14:16:53 -0300 |
commit | a3f415abe08552ece58f3ada553482423296c46a (patch) | |
tree | ec0a2797ed54ffc4468f7e531daaffd7f5049aee /drivers/media/pci/saa7134/saa7134-vbi.c | |
parent | 2ada815fc48bb0267876c2c24b275bd06485f746 (diff) | |
download | linux-stable-a3f415abe08552ece58f3ada553482423296c46a.tar.gz linux-stable-a3f415abe08552ece58f3ada553482423296c46a.tar.bz2 linux-stable-a3f415abe08552ece58f3ada553482423296c46a.zip |
[media] saa7134: add saa7134_userptr module option to enable USERPTR
If the saa7134 module is loaded with the saa7134_userptr set to 1,
then USERPTR support is enabled. A check in buffer_prepare
verifies that the pointer is page-aligned.
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 | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index 4479af5e4b9c..c06dbe17a87f 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -122,6 +122,10 @@ static int buffer_prepare(struct vb2_buffer *vb2) unsigned int size; int ret; + if (dma->sgl->offset) { + pr_err("The buffer is not page-aligned\n"); + return -EINVAL; + } size = dev->vbi_hlen * dev->vbi_vlen * 2; if (vb2_plane_size(vb2, 0) < size) return -EINVAL; |