Re trying to get hold of large chunks of memory, have a look at
alloc_bootmem_pages() and friends in linux/bootmem.h, or page 230 of
O'Reilly "Linux Device Drivers" 3rd edition.

I haven't used these but they sound like they might help. Apparently you
have to compile into the kernel but you could write your own quick and
dirty allocator and develop the rest as a module that used it, perhaps.

--
Jon Povey, Design Engineer
[EMAIL PROTECTED] | +44(0)1280 825983 

 


________________________________

        From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On
Behalf Of Stephen Berry
        Sent: 05 September 2008 15:31
        To: pavelhan
        Cc: davinci-linux-open-source
        Subject: Re: How much memory needed in the 5MP jpeg encode on
DM355?
        
        
        From what I remember, the V4l2 driver needs 2 buffers (10MB),
the JPEG encoder needs 19MB (at the very least, sometimes it asks for
another big buffer but since the first call failed you never get the
second request) and the IPIPE needs at least one source buffer (which
can be the V4l2 buffer) and one destination buffer (10MB). So you are
looking at needing 50MB of buffers to encode the 5MP image!
        
        In addition there is a PAGE_SIZE define in the kernel which
causes memory allocation failure for buffers this big. If you recode the
V4l2 driver so that it only allocates one buffer, and somehow find a way
to get sequential JPEG encoding to work (so that the encoder operates on
slices of the image at a time and not the entire 5mp) then you might
have a shot at getting it to work. 
        
        Alternatively you can add a bigger DDR to the EVM. We are
considering this route for our platform since it's simpler.
        
        Also reducing the available memory with the mem=80M boot arg
won't help with your kernel allocation problem. My understanding is that
the memory you don't allocate to the system (in this case 48MB) would
only be available to the CMEM allocator. And since you can't pass in
user pointers (CMEM memory) to the V4l2 driver, you have essentially
made the problem worse.
        
        This is my understanding... if anyone has any other thoughts I'd
certainly like to hear them!
        
         Steve
        
        pavelhan wrote: 

                My EVM board has 128M bytes DDR2 ram,and Now i am
involved in a 5MP jpeg encode design on DM355,the sensor is MICRON
MT9P031.
                I want to know the ccdc, ipie and jpegenc part on DM355
need how much memory to get the work more smoothly?
                My program hang at the ipipe initialization
function,beacause It can't get 2 10M bytes from linux kernel,
                but I have used the bootargs allocate 80M/100M to the
linux,is it not enough?so Why my program hang at the ipipe req_bufs?
                what should I do next?
                Thanks very much! any help will be appreciated!
                 
                Pavel
                 
                2008-09-05 
                ________________________________

                                 
                 
                Pavel Han
                Oplinx Co.,Ltd
                Address:Hanggang Fuchun Business Mansion 2116# Futian,
Shenzhen 518041,PRC
                Tel: (086)0755-88359865
                Website:www.oplinx.com.cn
                E-mail: [EMAIL PROTECTED] 
        
________________________________


                _______________________________________________
                Davinci-linux-open-source mailing list
                Davinci-linux-open-source@linux.davincidsp.com
        
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source
                  


 
Racelogic is a limited company registered in England. Registered number 2743719 
. 
Registered Office Unit 10, Swan Business Centre, Osier Way, Buckingham, Bucks, 
MK18 1TB .
The information contained in this electronic mail transmission is intended by 
Racelogic Ltd for the use of the named individual or entity to which it is 
directed and may contain information that is confidential or privileged. If you 
have received this electronic mail transmission in error, please delete it from 
your system without copying or forwarding it, and notify the sender of the 
error by reply email so that the sender's address records can be corrected. The 
views expressed by the sender of this communication do not necessarily 
represent those of Racelogic Ltd. Please note that Racelogic reserves the right 
to monitor e-mail communications passing through its network

_______________________________________________
Davinci-linux-open-source mailing list
Davinci-linux-open-source@linux.davincidsp.com
http://linux.davincidsp.com/mailman/listinfo/davinci-linux-open-source

Reply via email to