From: Sakari Ailus <sakari.ailus@linux.intel.com>
To: hverkuil-cisco@xs4all.nl
Cc: linux-media@vger.kernel.org, Tomasz Figa <tfiga@chromium.org>,
Paul Kocialkowski <paul.kocialkowski@bootlin.com>,
stable@vger.kernel.org
Subject: Re: [PATCH for v4.20 1/5] vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed
Date: Wed, 28 Nov 2018 14:14:25 +0200 [thread overview]
Message-ID: <20181128121425.ft6ab4jn2gtpyj5f@kekkonen.localdomain> (raw)
In-Reply-To: <20181128083747.18530-2-hverkuil-cisco@xs4all.nl>
On Wed, Nov 28, 2018 at 09:37:43AM +0100, hverkuil-cisco@xs4all.nl wrote:
> From: Hans Verkuil <hverkuil-cisco@xs4all.nl>
>
> vb2_start_streaming() already rolls back the buffers, so there is no
> need to call __vb2_queue_cancel(). Especially since __vb2_queue_cancel()
> does too much, such as zeroing the q->queued_count value, causing vb2
> to think that no buffers have been queued.
>
> It appears that this call to __vb2_queue_cancel() is a left-over from
> before commit b3379c6201bb3.
>
> Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
> Fixes: b3379c6201bb3 ('vb2: only call start_streaming if sufficient buffers are queued')
> Cc: <stable@vger.kernel.org> # for v4.16 and up
Acked-by: Sakari Ailus <sakari.ailus@linux.intel.com>
> ---
> drivers/media/common/videobuf2/videobuf2-core.c | 4 +---
> 1 file changed, 1 insertion(+), 3 deletions(-)
>
> diff --git a/drivers/media/common/videobuf2/videobuf2-core.c b/drivers/media/common/videobuf2/videobuf2-core.c
> index 0ca81d495bda..77e2bfe5e722 100644
> --- a/drivers/media/common/videobuf2/videobuf2-core.c
> +++ b/drivers/media/common/videobuf2/videobuf2-core.c
> @@ -1941,10 +1941,8 @@ int vb2_core_streamon(struct vb2_queue *q, unsigned int type)
> if (ret)
> return ret;
> ret = vb2_start_streaming(q);
> - if (ret) {
> - __vb2_queue_cancel(q);
> + if (ret)
> return ret;
> - }
> }
>
> q->streaming = 1;
--
Sakari Ailus
sakari.ailus@linux.intel.com
next prev parent reply other threads:[~2018-11-28 23:16 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-28 8:37 [PATCH for v4.20 0/5] vb2 fixes (mostly request API related) hverkuil-cisco
2018-11-28 8:37 ` [PATCH for v4.20 1/5] vb2: don't call __vb2_queue_cancel if vb2_start_streaming failed hverkuil-cisco
2018-11-28 12:14 ` Sakari Ailus [this message]
2018-11-28 8:37 ` [PATCH for v4.20 2/5] vb2: skip request checks for VIDIOC_PREPARE_BUF hverkuil-cisco
2018-11-28 8:37 ` [PATCH for v4.20 3/5] vb2: keep a reference to the request until dqbuf hverkuil-cisco
2018-11-28 8:37 ` [PATCH for v4.20 4/5] vb2: don't unbind/put the object when going to state QUEUED hverkuil-cisco
2018-11-28 8:37 ` [PATCH for v4.20 5/5] vivid: drop v4l2_ctrl_request_complete() from start_streaming hverkuil-cisco
2018-11-28 14:34 ` [PATCH for v4.20 0/5] vb2 fixes (mostly request API related) sakari.ailus
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=20181128121425.ft6ab4jn2gtpyj5f@kekkonen.localdomain \
--to=sakari.ailus@linux.intel.com \
--cc=hverkuil-cisco@xs4all.nl \
--cc=linux-media@vger.kernel.org \
--cc=paul.kocialkowski@bootlin.com \
--cc=stable@vger.kernel.org \
--cc=tfiga@chromium.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;
as well as URLs for NNTP newsgroup(s).