linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR
@ 2016-02-03 22:30 Mauro Carvalho Chehab
  2016-02-04 21:35 ` Matthias Schwarzott
  0 siblings, 1 reply; 2+ messages in thread
From: Mauro Carvalho Chehab @ 2016-02-03 22:30 UTC (permalink / raw)
  Cc: Mauro Carvalho Chehab, Linux Media Mailing List,
	Mauro Carvalho Chehab, Pawel Osciak, Marek Szyprowski,
	Kyungmin Park, Hans Verkuil, Junghak Sung, Matthias Schwarzott

changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data
and vb2_thread") broke videobuf2-dvb.

The root cause is that, instead of calling threadio->fnc() for
all types of events except for VB2_BUF_STATE_ERROR, it was calling
it only for VB2_BUF_STATE_DONE.

With that, the DVB thread were never called.

Cc: Hans Verkuil <hverkuil@xs4all.nl>
Cc: Junghak Sung <jh1009.sung@samsung.com>
Cc: Matthias Schwarzott <zzam@gentoo.org>
Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
---

This patch should be applied after https://patchwork.linuxtv.org/patch/32734/

 drivers/media/v4l2-core/videobuf2-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c
index 27b3ed01ce4d..dab94080ec3a 100644
--- a/drivers/media/v4l2-core/videobuf2-core.c
+++ b/drivers/media/v4l2-core/videobuf2-core.c
@@ -2743,7 +2743,7 @@ static int vb2_thread(void *data)
 			break;
 		try_to_freeze();
 
-		if (vb->state == VB2_BUF_STATE_DONE)
+		if (vb->state != VB2_BUF_STATE_ERROR)
 			if (threadio->fnc(vb, threadio->priv))
 				break;
 		call_void_qop(q, wait_finish, q);
-- 
2.5.0



^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR
  2016-02-03 22:30 [PATCH] [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR Mauro Carvalho Chehab
@ 2016-02-04 21:35 ` Matthias Schwarzott
  0 siblings, 0 replies; 2+ messages in thread
From: Matthias Schwarzott @ 2016-02-04 21:35 UTC (permalink / raw)
  To: Mauro Carvalho Chehab
  Cc: Linux Media Mailing List, Mauro Carvalho Chehab, Pawel Osciak,
	Marek Szyprowski, Kyungmin Park, Hans Verkuil, Junghak Sung

Am 03.02.2016 um 23:30 schrieb Mauro Carvalho Chehab:
> changeset 70433a152f0 ("media: videobuf2: Refactor vb2_fileio_data
> and vb2_thread") broke videobuf2-dvb.
> 
> The root cause is that, instead of calling threadio->fnc() for
> all types of events except for VB2_BUF_STATE_ERROR, it was calling
> it only for VB2_BUF_STATE_DONE.
> 
> With that, the DVB thread were never called.
> 
With this patch applied, I can confirm that receiving of dvb data works
again.

Regards
Matthias


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-04 21:35 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-02-03 22:30 [PATCH] [media] vb2-core: call threadio->fnc() if !VB2_BUF_STATE_ERROR Mauro Carvalho Chehab
2016-02-04 21:35 ` Matthias Schwarzott

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).