All of lore.kernel.org
 help / color / mirror / Atom feed
From: Matthieu CASTET <matthieu.castet@parrot.com>
To: Magnus Damm <magnus.damm@gmail.com>
Cc: video4linux-list@redhat.com,
	Guennadi Liakhovetski <g.liakhovetski@gmx.de>
Subject: Re: soc-camera : sh_mobile_ceu_camera race on free_buffer ?
Date: Mon, 19 Jan 2009 15:02:26 +0100	[thread overview]
Message-ID: <497487F2.7070400@parrot.com> (raw)

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@redhat.com?subject=unsubscribe
https://www.redhat.com/mailman/listinfo/video4linux-list

             reply	other threads:[~2009-01-19 14:03 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-19 14:02 Matthieu CASTET [this message]
2009-01-20  4:46 ` soc-camera : sh_mobile_ceu_camera race on free_buffer ? Magnus Damm
2009-01-20  9:27   ` Matthieu CASTET
2009-02-13 10:14     ` Magnus Damm
2009-02-16  1:07       ` morimoto.kuninori
2009-02-18 18:51         ` Guennadi Liakhovetski
2009-02-19  1:01           ` morimoto.kuninori
2009-02-19  7:29             ` Guennadi Liakhovetski
2009-02-19  8:07               ` morimoto.kuninori
2009-02-19  8:33                 ` Guennadi Liakhovetski
2009-02-19  9:30                   ` morimoto.kuninori
2009-02-19  9:51                     ` Guennadi Liakhovetski
2009-02-19 23:56                       ` morimoto.kuninori
2009-02-18 18:56       ` Guennadi Liakhovetski

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497487F2.7070400@parrot.com \
    --to=matthieu.castet@parrot.com \
    --cc=g.liakhovetski@gmx.de \
    --cc=magnus.damm@gmail.com \
    --cc=video4linux-list@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.