linux-mips
[Top] [All Lists]

Re: ALCHEMY: Alchemy Camera Interface (CIM) driver

To: "Matej Kupljen" <matej.kupljen@ultra.si>
Subject: Re: ALCHEMY: Alchemy Camera Interface (CIM) driver
From: "Jordan Crouse" <jordan.crouse@amd.com>
Date: Mon, 5 Dec 2005 08:06:18 -0700
Cc: linux-mips@linux-mips.org, ralf@linux-mips.org
In-reply-to: <1133772567.2377.11.camel@localhost.localdomain>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <20051202190635.GI28227@cosmic.amd.com> <1133772567.2377.11.camel@localhost.localdomain>
Sender: linux-mips-bounce@linux-mips.org
User-agent: Mutt/1.5.11
On 05/12/05 09:49 +0100, Matej Kupljen wrote:

> Wouldn't it be wise to support V4L2?
> This way, many existing application could use AU1200s camera interface.

Thats possible, but for now this solution has been reasonable enough for
us to send it upstream.  I'm sure that somebody more familiar with V4L2 could
make short work of adapting it to the existing infrastructure.
 
> > +int __init
> > +au1xxxcim_init(void)
> > +{
> > +   int retval, error;
> > +   unsigned long page;
> > +   CAMERA_RUNTIME *cam_init;
> > +   CAMERA *cim_ptr;
> > +
> > +   cam_init = &cam_base;
> > +   cam_init->cmos_camera = OrigCimArryPtr + prev_mode;
> > +   cim_ptr = cam_init->cmos_camera;
> > +
> > +   /*Allocating memory for MMAP */
> > +   mem_buf = (unsigned long *)Camera_mem_alloc(2 * MAX_FRAME_SIZE);
> > +   if (mem_buf == NULL) {
> > +           printk(KERN_ERR "MMAP unable to allocate memory \n");
> > +   }
> 
> IMHO this is a waste of memory, because if the user is going to use
> the camera in 320x240 mode and this allocates memory for the biggest
> size. Wouldn't it be better to set some default configuration and
> allocate memory for this? Later if the user changes the mode those
> pages are freed and new (for requested size) are allocated.
> Or even allocate memory AFTER the configuration has been set?

I agree, that could be handled better.

Thanks,

Jordan
-- 
Jordan Crouse
Senior Linux Engineer
AMD - Personal Connectivity Solutions Group
<www.amd.com/embeddedprocessors>


<Prev in Thread] Current Thread [Next in Thread>