V4L/DVB (13598): videobuf_dma_contig_user_get() for non-aligned offsets
authorMuralidharan Karicheri <m-karicheri2@ti.com>
Thu, 10 Dec 2009 19:47:48 +0000 (16:47 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Wed, 16 Dec 2009 02:18:34 +0000 (00:18 -0200)
commit31bedfa5068936b15a388842be1d03cdd1bdfb07
treed02d9204a0ed1fe2a9eca8b7f2d1553b1d85d5a3
parent0d94e29459d372b6c5dda964a8b35a8d40050ca7
V4L/DVB (13598): videobuf_dma_contig_user_get() for non-aligned offsets

If a USERPTR address that is not aligned to page boundary is passed to the
videobuf_dma_contig_user_get() function, it saves a page aligned address to
the dma_handle. This is not correct. This issue is observed when using USERPTR
IO machism for buffer exchange.

Updates from last version:-

Adding offset for size calculation as per comment from Magnus Damm. This
ensures the last page is also included for checking if memory is
contiguous.

Signed-off-by: Muralidharan Karicheri <m-karicheri2@ti.com>
Acked-by: Magnus Damm <damm@opensource.se>
Signed-off-by: Douglas Schilling Landgraf <dougsland@redhat.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/videobuf-dma-contig.c