RE: How to save number of times using memcpy?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Laurent,

Ok, now I understand how /dev/mem works. This should works as well. But one of our apps engineer mentioned some problems in using /dev/mem related to mmap. Did you encounter any issues while using this method?

The driver is basically written to allocate multiple pools and buffers per pool to satisfies various memory allocation requirements inside our TI SDK. 

Murali Karicheri
Software Design Engineer
Texas Instruments Inc.
Germantown, MD 20874
Phone : 301-515-3736
email: m-karicheri2@xxxxxx

>-----Original Message-----
>From: Laurent Pinchart [mailto:laurent.pinchart@xxxxxxxxx]
>Sent: Wednesday, July 29, 2009 3:06 PM
>To: Karicheri, Muralidharan
>Cc: Mauro Carvalho Chehab; Dongsoo, Nathaniel Kim; v4l2_linux; Dongsoo Kim;
>박경민; jm105.lee@xxxxxxxxxxx; 이세문; 대인기; 김형준
>Subject: Re: How to save number of times using memcpy?
>
>On Wednesday 29 July 2009 20:36:25 Karicheri, Muralidharan wrote:
>> <Snip>
>>
>> > > the details, but I think the strategy were to pass a parameter during
>> > > kernel boot, for it to reserve some amount of memory that would later
>be
>> > > claimed by the V4L device.
>> >
>> > It's actually a pretty common strategy for embedded hardware (the
>> > "general- purpose machine" case doesn't - for now - make much sense on
>an
>> > OMAP processor for instance). A memory chunk would be reserved at boot
>> > time at the end of the physical memory by passing the mem= parameter to
>> > the kernel. Video applications would then mmap() /dev/mem to access
>that
>> > memory (I'd have to check the details on that one, that's from my
>memory),
>> > and pass the pointer the the v4l2 driver using userptr I/O. This
>requires
>> > root privileges, and people usually don't care about that when the
>final
>> > application is a camera (usually embedded in some device like a media
>> > player, an IP camera, ...).
>>
>> Yes. This is exactly what we are doing in the case of davinci processors.
>> We have a kernel module that uses memory from the end of SDRAM space and
>> mmap it to application through a set of APIs. They allocate contiguous
>> memory pools and return the same to application through IOCTLs. I have
>> tested vpfe capture using this approach (but yet to push the same to v4l2
>> community for review). The same approach may be used across other
>platforms
>> as well. So doesn't it make sense to add this kernel module to the kernel
>> tree so that everyone can use it?
>
>What's wrong with mmap()'ing /dev/mem ? Why do you need a special driver ?
>
>Regards,
>
>Laurent Pinchart
>

淸{.n+돴윯돪+%듚깁負w{.n+돴{깸g돬왲^nr⊆z곷h솳鈺&{z요z받쀺++zf"h닱~넮녬i곴묎z_溫j:+v돣)山m


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux