Re: question for soc-camera driver
- Date: Fri, 16 May 2008 18:32:18 +0800
- From: "冯鑫" <fengxin215@xxxxxxxxx>
- Subject: Re: question for soc-camera driver
2008/5/15 Guennadi Liakhovetski <g.liakhovetski@xxxxxx>:
> 2008/5/15 Guennadi Liakhovetski <g.liakhovetski@xxxxxx>:
> What is your <struct pxacamera_platform_data>.mclk_10khz set to? What
> kernel version are you using? I do not know what you do in your FPGA, are
> you sure it doesn't modify your camera bus timing (pixel clock, VSYNC,
> HSYNC, master clock)?
mclk_10khz=1000,and I try 800,500. And the number of dropped frames do
not decrease with lower frequencies. kernel I used is linux-2.6.24.
And I sure FPGA doesn't modify my camera bus timing.
> Do you mean camera FIFO overruns occur, but fraims do not get dropped? The
> reason, why with NOR you have more problems might be, that you produce
> extra load on the memory bus? I don't remember id you already told us,
> What's your frame format? 640x480x8bit?
If camera FIFO overruns occur,frames will be dropped.Now my frame
format is 752x480x8bit.
> what type of LCD you have on your system and what other bus masters you
> have?
I only use a thread to capure frame and do not display it.I have no
other bus master.the following is my capture thread:
static int dhpa_capture_thread(void)
{
struct v4l2_buffer buf;
int frame_cnt;
static time_t init, end;
while(1)
{
/*read frame*/
memset(&buf, 0, sizeof(buf));
buf.type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
buf.memory = V4L2_MEMORY_MMAP;
/*get the captured buffer*/
if(-1 == ioctl(fd, VIDIOC_DQBUF, &buf))
{
printf( "VIDIOC_DQBUF failed\n ");
return -1;
}
if(-1 == ioctl(fd, VIDIOC_QBUF, &buf))
{
printf("VIDIOC_QBUF failed\n");
return -1;
}
}
}
> More importantly, what do you do while waiting for jffs2 write to finish?
I do nothing while waiting for jffs2 write to finish.but I do not stop
grabber thread.
> I assume, you write to the filesystem from another thread, right? And the
> writer thread just blocks on write(). What does your grabber thread do at
> this time? Can it continue processing video buffers and queuing new ones
> or it waits for the writer thread?
yes, I use another thread to write a file.when I write a file to
Norflash,overrun will occur until writting is over.My grabber thread
waits for the writer thread at this time.
Thanks
fengxin
--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list