Re: soc-camera : sh_mobile_ceu_camera race on free_buffer ?

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


Hi,

I am writing a soc camera driver, and I use sh_mobile_ceu_camera as an
example.

But I don't understand how buffer are handled when the application is
doing a streamoff :

streamoff will call videobuf_streamoff and then videobuf_queue_cancel.
videobuf_queue_cancel will call free_buffer.

But we didn't do stop_capture, so as far I understand the controller is
still writing data in memory. What prevent us to free the buffer we are
writing.


Why doesn't we do a stop_capture before videobuf_streamoff ?

I saw that pxa_camera use videobuf_waiton, before freeing the buffer.
That seem more safe, but that mean we need to wait that controller
finish to write all the pending buffer.


Matthieu

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

[Linux Media]     [Older V4L]     [Linux DVB]     [Video Disk Recorder]     [Linux Kernel]     [Asterisk]     [Photo]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Free Photo Albums]     [Fedora Users]     [Fedora Women]     [ALSA Users]     [ALSA Devel]     [SSH]     [DVB Maintainers]     [Linux USB]     [Yosemite Information]

Add to Google Powered by Linux