Re: How to save number of times using memcpy?

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

 



On Wednesday 29 July 2009 05:55:51 Mauro Carvalho Chehab wrote:
> Em Wed, 29 Jul 2009 12:30:19 +0900
>
> "Dongsoo, Nathaniel Kim" <dongsoo.kim@xxxxxxxxx> escreveu:
> > Sorry my bad. I missed something very important to explain my issue
> > clear. The thing is, I want to reserve specific amount of continuous
> > physical memory on machine initializing time. Therefor some multimedia
> > peripherals can be using this memory area exclusively.
> > That's what I was afraid of could not being adopted in main line kernel.
>
> In the past, some drivers used to do that, but this is also a source
> of problems, especially with general-purpose machines, where you're loosing
> memory that could otherwise be used by something else. I never tried to get
> 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, ...).

Regards,

Laurent Pinchart

--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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