linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steve Longerbeam <slongerbeam@gmail.com>
To: Ian Jamison <ian.dev@arkver.com>,
	Hans Verkuil <hverkuil@xs4all.nl>,
	linux-media@vger.kernel.org
Cc: Philipp Zabel <p.zabel@pengutronix.de>
Subject: Re: [PATCH v2] media: imx: Remove incorrect check for queue state in start/stop_streaming
Date: Fri, 1 Dec 2017 10:58:57 -0800	[thread overview]
Message-ID: <07fd2bff-03b4-dfbe-86e1-ddd7f5d98cf2@gmail.com> (raw)
In-Reply-To: <ac504a93b483b40a8b2f9087af8c6d25672c7d6c.1512154062.git.ian.dev@arkver.com>



On 12/01/2017 10:53 AM, 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.
>
> Also removed the queue state check in stop_streaming since it's
> not valid there either.

Reviewed-by: Steve Longerbeam <steve_longerbeam@mentor.com>

> Signed-off-by: Ian Jamison <ian.dev@arkver.com>
> ---
> Since v1:
>      Remove check in capture_stop_streaming as recommended by Hans.
>
>   drivers/staging/media/imx/imx-media-capture.c | 6 ------
>   1 file changed, 6 deletions(-)
>
> diff --git a/drivers/staging/media/imx/imx-media-capture.c b/drivers/staging/media/imx/imx-media-capture.c
> index ea145bafb880..7b6763802db8 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) {
> @@ -480,9 +477,6 @@ static void capture_stop_streaming(struct vb2_queue *vq)
>   	unsigned long flags;
>   	int ret;
>   
> -	if (!vb2_is_streaming(vq))
> -		return;
> -
>   	spin_lock_irqsave(&priv->q_lock, flags);
>   	priv->stop = true;
>   	spin_unlock_irqrestore(&priv->q_lock, flags);

      reply	other threads:[~2017-12-01 18:59 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-12-01 18:53 [PATCH v2] media: imx: Remove incorrect check for queue state in start/stop_streaming Ian Jamison
2017-12-01 18:58 ` Steve Longerbeam [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=07fd2bff-03b4-dfbe-86e1-ddd7f5d98cf2@gmail.com \
    --to=slongerbeam@gmail.com \
    --cc=hverkuil@xs4all.nl \
    --cc=ian.dev@arkver.com \
    --cc=linux-media@vger.kernel.org \
    --cc=p.zabel@pengutronix.de \
    /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).