From: Hans Verkuil <hverkuil@xs4all.nl>
To: Ian Jamison <ian.dev@arkver.com>,
linux-media@vger.kernel.org,
Steve Longerbeam <slongerbeam@gmail.com>
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH] media: imx: Remove incorrect check for queue state in start_streaming
Date: Fri, 1 Dec 2017 13:47:53 +0100 [thread overview]
Message-ID: <67dce84a-1bb9-9cab-221a-501244244d17@xs4all.nl> (raw)
In-Reply-To: <37124a40f1388b0b0a2f2226661280962f23102d.1510942589.git.ian.dev@arkver.com>
On 11/17/17 19:23, Ian Jamison wrote:
> It is possible to call STREAMON without the minimum number of
> buffers queued. In this case the vb2_queue state will be set to
> streaming but the start_streaming vb2_op will not be called.
> Later when enough buffers are queued, start_streaming will
> be called but vb2_is_streaming will already return true.
>
> Signed-off-by: Ian Jamison <ian.dev@arkver.com>
> ---
> drivers/staging/media/imx/imx-media-capture.c | 3 ---
> 1 file changed, 3 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index ddab4c249da2..34b492c2419c 100644
> --- a/drivers/staging/media/imx/imx-media-capture.c
> +++ b/drivers/staging/media/imx/imx-media-capture.c
> @@ -449,9 +449,6 @@ static int capture_start_streaming(struct vb2_queue *vq, unsigned int count)
> unsigned long flags;
> int ret;
>
> - if (vb2_is_streaming(vq))
> - return 0;
> -
> ret = imx_media_pipeline_set_stream(priv->md, &priv->src_sd->entity,
> true);
> if (ret) {
>
Can you also remove this from capture_stop_streaming:
if (!vb2_is_streaming(vq))
return;
Both checks are wrong and pointless. The vb2 core will do all the right checks
and this shouldn't be done again (and wrongly) in the driver.
Regards,
Hans
prev parent reply other threads:[~2017-12-01 12:47 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-17 18:23 [PATCH] media: imx: Remove incorrect check for queue state in start_streaming Ian Jamison
2017-12-01 12:47 ` Hans Verkuil [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=67dce84a-1bb9-9cab-221a-501244244d17@xs4all.nl \
--to=hverkuil@xs4all.nl \
--cc=ian.dev@arkver.com \
--cc=linux-media@vger.kernel.org \
--cc=p.zabel@pengutronix.de \
--cc=slongerbeam@gmail.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).