Web lists-archives.org

Re: question for soc-camera driver




2008/5/15 Guennadi Liakhovetski <g.liakhovetski@xxxxxx>:
>> > 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 type of LCD you have on your system and what other bus masters you
>> > have? What's your frame format? 640x480x8bit?
>>
>> My frame format is 752x480x8bit.Now I only capure frame.And I do not
>> display. 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;
>>               }
>>       }
>> }
>> Now if I write a file to jffs2 norflash,FIFO overrun will
>> occur.Certainly frame is dropped.I only hope you give me some
>> advice.why do overrun occur when writting norflash.Because I feel
>> capture frame only use DMA now,I think that write norflash will not
>> affect DMA.

> DMA uses the same memory bus as NOR flash. Also, if the NOR driver blocks
> interrupts, it will delay processing of DMA interrupts, but that is
> unlikely to cause you problems, provided you use enough (4 should be good)
> video buffers.

Do you mean DMA use the same memory bus as Nor flash,so when I write a
file to Norflash,overrun will occur?Now I find that I write a file to
yaffs Nandflash or /tmp/,overrun will occur too.do Nandflash use the
same memory bus as DMA? Now I use 4 viedo buffers.

> More importantly, what do you do while waiting for jffs2 write to finish?
> 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 write a file from another thread.And my graber thread contiune
processing video buffers and queuning new ones.

Thanks
fengxin

--
video4linux-list mailing list
Unsubscribe mailto:video4linux-list-request@xxxxxxxxxx?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list