From: Andrey Utkin <andrey.krieger.utkin@gmail.com>
To: linux-kernel@vger.kernel.org, linux-media@vger.kernel.org,
devel@driverdev.osuosl.org
Cc: ismael.luceno@corp.bluecherry.net, m.chehab@samsung.com,
hverkuil@xs4all.nl, Andrey Utkin <andrey.krieger.utkin@gmail.com>
Subject: [PATCH 1/4] [media] solo6x10: free vb2 buffers on stop_streaming
Date: Wed, 29 Oct 2014 20:03:51 +0400 [thread overview]
Message-ID: <1414598634-13446-1-git-send-email-andrey.krieger.utkin@gmail.com> (raw)
This fixes warning from drivers/media/v4l2-core/videobuf2-core.c:2144
Signed-off-by: Andrey Utkin <andrey.krieger.utkin@gmail.com>
---
drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
diff --git a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
index 28023f9..6cd6a25 100644
--- a/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
+++ b/drivers/media/pci/solo6x10/solo6x10-v4l2-enc.c
@@ -781,9 +781,19 @@ static int solo_enc_start_streaming(struct vb2_queue *q, unsigned int count)
static void solo_enc_stop_streaming(struct vb2_queue *q)
{
struct solo_enc_dev *solo_enc = vb2_get_drv_priv(q);
+ unsigned long flags;
+ spin_lock_irqsave(&solo_enc->av_lock, flags);
solo_enc_off(solo_enc);
- INIT_LIST_HEAD(&solo_enc->vidq_active);
+ while (!list_empty(&solo_enc->vidq_active)) {
+ struct solo_vb2_buf *buf = list_entry(
+ solo_enc->vidq_active.next,
+ struct solo_vb2_buf, list);
+
+ list_del(&buf->list);
+ vb2_buffer_done(&buf->vb, VB2_BUF_STATE_ERROR);
+ }
+ spin_unlock_irqrestore(&solo_enc->av_lock, flags);
solo_ring_stop(solo_enc->solo_dev);
}
--
1.8.5.5
next reply other threads:[~2014-10-29 16:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-29 16:03 Andrey Utkin [this message]
2014-10-29 16:03 ` [PATCH 2/4] [media] solo6x10: free DMA allocation when releasing encoder Andrey Utkin
2014-10-29 16:03 ` [PATCH 3/4] [media] solo6x10: bind start & stop of encoded frames processing thread to device (de)init Andrey Utkin
2014-10-29 16:03 ` [PATCH 4/4] [media] solo6x10: don't turn off/on encoder interrupt in processing loop Andrey Utkin
2014-11-03 15:15 ` Hans Verkuil
2014-11-04 17:55 ` Andrey Utkin
2014-11-06 14:58 ` [PATCH 1/4] [media] solo6x10: free vb2 buffers on stop_streaming Dan Carpenter
2014-11-06 21:06 ` [PATCH v2 1/4] [media] solo6x10: clean up properly in stop_streaming Andrey Utkin
2014-11-07 6:30 ` Dan Carpenter
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=1414598634-13446-1-git-send-email-andrey.krieger.utkin@gmail.com \
--to=andrey.krieger.utkin@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=hverkuil@xs4all.nl \
--cc=ismael.luceno@corp.bluecherry.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-media@vger.kernel.org \
--cc=m.chehab@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
all inboxes | Powered by JetHome®