From: "Frank Schäfer" <fschaefer.oss@googlemail.com>
To: Mauro Carvalho Chehab <mchehab@osg.samsung.com>, unlisted-recipients:;
Cc: Linux Media Mailing List <linux-media@vger.kernel.org>,
Mauro Carvalho Chehab <mchehab@infradead.org>
Subject: Re: [PATCH 2/2] em28xx: fix VBI handling logic
Date: Tue, 23 Sep 2014 21:32:02 +0200 [thread overview]
Message-ID: <5421CAB2.3030804@googlemail.com> (raw)
In-Reply-To: <8444ab3f16a454ab8d2eaefb8990193313c2ac33.1411142521.git.mchehab@osg.samsung.com>
Am 19.09.2014 um 18:02 schrieb Mauro Carvalho Chehab:
> When both VBI and video are streaming, and video stream is stopped,
> a subsequent trial to restart it will fail, because S_FMT will
> return -EBUSY.
>
> That prevents applications like zvbi to work properly.
>
> Please notice that, while this fix it fully for zvbi, the
> best is to get rid of streaming_users and res_get logic as a hole.
>
> However, this single-line patch is better to be merged at -stable.
>
> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
>
> diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c
> index 08569cbccd95..d75e7f82dfb9 100644
> --- a/drivers/media/usb/em28xx/em28xx-video.c
> +++ b/drivers/media/usb/em28xx/em28xx-video.c
> @@ -1351,7 +1351,7 @@ static int vidioc_s_fmt_vid_cap(struct file *file, void *priv,
> struct em28xx *dev = video_drvdata(file);
> struct em28xx_v4l2 *v4l2 = dev->v4l2;
>
> - if (v4l2->streaming_users > 0)
> + if (vb2_is_busy(&v4l2->vb_vidq))
Looks dangerous.
Are you 100% sure that VIDIOC_S_FMT can have no effect on VBI capturing ?
It seems to trigger writes to multiple registers...
Regards,
Frank
> return -EBUSY;
>
> vidioc_try_fmt_vid_cap(file, priv, f);
next prev parent reply other threads:[~2014-09-23 19:30 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-19 16:02 [PATCH 1/2] em28xx: Get rid of some unused modprobe parameters at vbi code Mauro Carvalho Chehab
2014-09-19 16:02 ` [PATCH 2/2] em28xx: fix VBI handling logic Mauro Carvalho Chehab
2014-09-23 19:32 ` Frank Schäfer [this message]
2014-09-23 23:18 ` Mauro Carvalho Chehab
2014-09-25 13:59 ` Frank Schäfer
2014-09-25 14:07 ` Mauro Carvalho Chehab
2014-09-25 14:26 ` Frank Schäfer
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=5421CAB2.3030804@googlemail.com \
--to=fschaefer.oss@googlemail.com \
--cc=linux-media@vger.kernel.org \
--cc=mchehab@infradead.org \
--cc=mchehab@osg.samsung.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).