2011/6/16 Scott Jiang <scott.jiang.li...@gmail.com>:
> 2011/6/16 Marek Szyprowski <m.szyprow...@samsung.com>:
>> Hello Scott,
>>
>>> Hi Marek and Laurent,
>>>
>>> I am working on v4l2 drivers for blackfin which is a no mmu soc.
>>> I found videobuf allocate memory in mmap not reqbuf, so I turn to videobuf2.
>>> But __setup_offsets() use plane offset to fill m.offset, which is
>>> always 0 for single-planar buffer.
>>> So pgoff in get_unmapped_area callback equals 0.
>>> I only found uvc handled get_unmapped_area for no mmu system, but it
>>> manages buffers itself.
>>> I really want videobuf2 to manage buffers. Please give me some advice.
>>
>> I'm not really sure if I know the differences between mmu and no-mmu
>> systems (from the device driver perspective). I assume that you are using
>> videobuf2-vmalloc allocator. Note that memory allocators/managers are well
>> separated from the videobuf2 logic. If it the current one doesn't serve you
>> well you can make your own no-mmu allocator. Later once we identify all
>> differences it might be merged with the standard one or left alone if the
>> merge is not really possible or easy.
>>
>> Best regards
>> --
>> Marek Szyprowski
>> Samsung Poland R&D Center
>>
>>
>>
>
> Hi Marek,
>
> I used dma-contig allocator. I mean if offset is 0, I must get actual
> addr from this offset.
hi, Scott

if it is single plane, surely the offset is 0 for plane 0
what do you mean the actual addr ?


> __find_plane_by_offset can do this. But it is an internal function.
> I think there should be a function called vb2_get_unmapped_area to do
> this in framework side.
are you using soc_camera ?
you can add your get_unmapped_area  in soc_camera.
if not, you can add it in your v4l2_file_operations ops, while still
using videbuf2 to management your buffer.
>
> Regards,
> Scott
> --
> To unsubscribe from this list: send the line "unsubscribe linux-media" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
>



-- 
Best regards
Kassey
Application Processor Systems Engineering, Marvell Technology Group Ltd.
Shanghai, China.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to