Hello,
On 2013-11-06 20:48, Ricardo Ribalda Delgado wrote:
Memory exported via remap_pfn_range cannot be remapped via
get_user_pages.
Other videobuf2 methods (like the dma-contig) supports io memory.
This patch adds support for this kind of memory.
Signed-off-by: Ricardo Ribalda Delgado
---
Hello Marek
Could you review the patch? Is there something that needs to be fixed?
Thanks!
On Mon, Nov 25, 2013 at 4:41 PM, Marek Szyprowski
wrote:
> Hello,
>
>
> On 2013-11-11 12:36, Matthias Wächter wrote:
>>
>> > @@ -180,7 +186,26 @@ static void *vb2_dma_sg_get_userptr(void
>> > *alloc_ctx,
Hello,
On 2013-11-11 12:36, Matthias Wächter wrote:
> @@ -180,7 +186,26 @@ static void *vb2_dma_sg_get_userptr(void
> *alloc_ctx, unsigned long vaddr,
> if (!buf->pages)
> return NULL;
>
> - num_pages_from_user = get_user_pages(current, current->mm,
> + buf->vma = fin
Hello Mathias
Memory managing is definately not my topic. I have done the same as in
vb2-dmacontig, and it has worked on my driver (out of tree).
I think that if there is something wrong it will also be wrong on the
dmacontig part, and much more drivers would be affected, so please
also take a lo
> @@ -180,7 +186,26 @@ static void *vb2_dma_sg_get_userptr(void
> *alloc_ctx, unsigned long vaddr,
> if (!buf->pages)
> return NULL;
>
> - num_pages_from_user = get_user_pages(current, current->mm,
> + buf->vma = find_vma(current->mm, vaddr);
> + if (!buf->vma) {
> +
Memory exported via remap_pfn_range cannot be remapped via
get_user_pages.
Other videobuf2 methods (like the dma-contig) supports io memory.
This patch adds support for this kind of memory.
Signed-off-by: Ricardo Ribalda Delgado
---
drivers/media/v4l2-core/videobuf2-dma-sg.c | 35 +