From: Jean-Francois Moine <moinejf@free.fr>
To: Hans de Goede <hdegoede@redhat.com>
Cc: "James Blanford" <jhblanford@gmail.com>,
linux-media@vger.kernel.org,
"Erik Andrén" <erik.andren@gmail.com>
Subject: Re: Race in gspca main or missing lock in stv06xx subdriver?
Date: Sun, 4 Oct 2009 18:41:13 +0200 [thread overview]
Message-ID: <20091004184113.2af754a7@tele> (raw)
In-Reply-To: <4AC8C117.6060406@redhat.com>
On Sun, 04 Oct 2009 17:36:55 +0200
Hans de Goede <hdegoede@redhat.com> wrote:
> As Jean-Francois very correctly pointed out, but no worries. The
> handling of isoc irq's is serialised elsewhere in the kernel, the
> issue of what James is seeing is much simpler.
>
> When we call gspca_frame_add, it returns a pointer to the frame
> passed in, unless we call it with LAST_PACKET, when it will return a
> pointer to a new frame in to whoch store the frame data for the next
> frame. So whenever calling:
> gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, len);
> we should do this as:
> frame = gspca_frame_add(gspca_dev, LAST_PACKET, frame, data, len);
>
> So that any further data got from of the pkt we are handling in
> pkt_scan, goes to the next frame.
>
> We are not doing this in stv06xx.c pkt_scan method, which the cause
> of what James is seeing. So I started checking all drivers, and we
> are not doing this either in ov519.c when handling an ov518 bridge.
> So now the framerate of my 3 ov518 test cams has just doubled. Thanks
> James!
>
> I'll send a patch with the fix in a separate mail.
Hello Hans,
Thank you for the patch. Yes, it was simple and I should have seen it
before! I think this problem could be avoided if the frame pointer is
not given to the pkt_scan function (if the subdriver needs it, it is
returned by gspca_get_i_frame).
Best regards.
--
Ken ar c'hentañ | ** Breizh ha Linux atav! **
Jef | http://moinejf.free.fr/
prev parent reply other threads:[~2009-10-04 16:41 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-09-14 15:17 Race in gspca main or missing lock in stv06xx subdriver? James Blanford
2009-09-15 10:41 ` Jean-Francois Moine
2009-10-01 13:23 ` Erik Andrén
2009-10-03 7:28 ` Jean-Francois Moine
2009-10-04 10:45 ` Erik Andrén
2009-10-04 15:36 ` Hans de Goede
2009-10-04 16:41 ` Jean-Francois Moine [this message]
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=20091004184113.2af754a7@tele \
--to=moinejf@free.fr \
--cc=erik.andren@gmail.com \
--cc=hdegoede@redhat.com \
--cc=jhblanford@gmail.com \
--cc=linux-media@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox