linux/drivers/media/platform
Lad, Prabhakar e6ba3db104 [media] media: davinci: vpif_capture: fix releasing of active buffers
from commit-id: b3379c6201
"vb2: only call start_streaming if sufficient buffers are queued"
the vb2 framework warns on (WARN_ON()) if all the active buffers
are not released when streaming is stopped, initially the vb2 silently
released the buffer internally if the buffer was not released by
the driver.
Also this patch moves the disabling of interrupts from relase() callback
to stop_streaming() callback as which needs to be done ideally.

This patch fixes following issue:

WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:2011 __vb2_queue_cancel+0x1a0/0x218()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_capture Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252e0c>] (__vb2_queue_cancel+0x1a0/0x218)
[<c0252e0c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpif_release+0x60/0x230)
[<c025a65c>] (vpif_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a1 ]---
------------[ cut here ]------------
WARNING: CPU: 0 PID: 2049 at drivers/media/v4l2-core/videobuf2-core.c:1095 vb2_buffer_done+0x1e0/0x224()
Modules linked in:
CPU: 0 PID: 2049 Comm: vpif_capture Tainted: G        W    3.14.0-rc5-00414-ged97a6f #89
[<c000e3f0>] (unwind_backtrace) from [<c000c618>] (show_stack+0x10/0x14)
[<c000c618>] (show_stack) from [<c001adb0>] (warn_slowpath_common+0x68/0x88)
[<c001adb0>] (warn_slowpath_common) from [<c001adec>] (warn_slowpath_null+0x1c/0x24)
[<c001adec>] (warn_slowpath_null) from [<c0252c28>] (vb2_buffer_done+0x1e0/0x224)
[<c0252c28>] (vb2_buffer_done) from [<c0252e3c>] (__vb2_queue_cancel+0x1d0/0x218)
[<c0252e3c>] (__vb2_queue_cancel) from [<c02533a4>] (vb2_queue_release+0x14/0x24)
[<c02533a4>] (vb2_queue_release) from [<c025a65c>] (vpif_release+0x60/0x230)
[<c025a65c>] (vpif_release) from [<c023fe5c>] (v4l2_release+0x34/0x74)
[<c023fe5c>] (v4l2_release) from [<c00b4a00>] (__fput+0x80/0x224)
[<c00b4a00>] (__fput) from [<c00341e8>] (task_work_run+0xa0/0xd0)
[<c00341e8>] (task_work_run) from [<c001cc28>] (do_exit+0x244/0x918)
[<c001cc28>] (do_exit) from [<c001d344>] (do_group_exit+0x48/0xdc)
[<c001d344>] (do_group_exit) from [<c0029894>] (get_signal_to_deliver+0x2a0/0x5bc)
[<c0029894>] (get_signal_to_deliver) from [<c000b888>] (do_signal+0x78/0x3a0)
[<c000b888>] (do_signal) from [<c000bc54>] (do_work_pending+0xa4/0xb4)
[<c000bc54>] (do_work_pending) from [<c00096dc>] (work_pending+0xc/0x20)
---[ end trace 5faa75e8c2f8a6a2 ]---

Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
2014-04-15 09:50:32 -03:00
..
blackfin [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags 2014-03-05 16:34:14 -03:00
davinci [media] media: davinci: vpif_capture: fix releasing of active buffers 2014-04-15 09:50:32 -03:00
exynos4-is [media] s5p-fimc: Fix YUV422P depth 2014-04-15 09:50:06 -03:00
exynos-gsc [media] v4l: Copy timestamp source flags to destination on m2m devices 2014-03-05 16:47:15 -03:00
marvell-ccic [media] vb2: change result code of buf_finish to void 2014-03-11 06:56:38 -03:00
omap [media] omap_vout: Add DVI display type support 2014-03-11 12:10:06 -03:00
omap3isp [media] omap3isp: Fix kerneldoc for _module_sync_is_stopping and isp_isr() 2014-03-05 17:02:07 -03:00
s3c-camif [media] v4l: Rename vb2_queue.timestamp_type as timestamp_flags 2014-03-05 16:34:14 -03:00
s5p-g2d [media] v4l: Copy timestamp source flags to destination on m2m devices 2014-03-05 16:47:15 -03:00
s5p-jpeg [media] s5p-jpeg: Fix broken indentation in jpeg-regs.h 2014-03-14 10:37:24 -03:00
s5p-mfc [media] s5p-mfc: remove meaningless memory bank assignment 2014-03-11 10:29:09 -03:00
s5p-tv [media] vb2: only call start_streaming if sufficient buffers are queued 2014-03-11 06:56:41 -03:00
soc_camera [media] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras 2014-03-11 09:32:26 -03:00
ti-vpe [media] v4l: ti-vpe: retain v4l2_buffer flags for captured buffers 2014-04-07 09:44:25 -03:00
vsp1 [media] v4l: vsp1: Update copyright notice 2014-03-12 10:41:51 -03:00
arv.c [media] arv: fix sleep_on race 2014-03-11 09:23:10 -03:00
coda.c [media] v4l: Copy timestamp source flags to destination on m2m devices 2014-03-05 16:47:15 -03:00
coda.h [media] coda: add CODA7541 decoding support 2013-07-31 15:56:44 -03:00
fsl-viu.c fsl-viu: adjust for OF based clock lookup 2014-01-12 18:53:05 +01:00
indycam.c [media] indycam: remove g_chip_ident op 2013-06-17 08:49:47 -03:00
indycam.h
Kconfig [media] v4l: VIDEO_SH_VOU should depend on HAS_DMA 2014-03-11 09:22:48 -03:00
m2m-deinterlace.c [media] v4l: Copy timestamp source flags to destination on m2m devices 2014-03-05 16:47:15 -03:00
Makefile [media] omap24xx/tcm825x: move to staging for future removal 2013-12-20 13:45:22 -02:00
mem2mem_testdev.c [media] mem2mem_testdev: improve field handling 2014-03-11 10:34:56 -03:00
mx2_emmaprp.c [media] v4l: Copy timestamp source flags to destination on m2m devices 2014-03-05 16:47:15 -03:00
sh_veu.c sh_veu: Replace PTR_RET with PTR_ERR_OR_ZERO 2013-07-16 16:06:01 +09:30
sh_vou.c [media] sh_vou: comment unused vars 2014-01-13 11:30:26 -02:00
timblogiw.c Merge branch 'next' of git://git.infradead.org/users/vkoul/slave-dma 2013-11-20 13:20:24 -08:00
via-camera.c [media] via-camera: replace current_norm by g_std 2013-06-17 09:33:49 -03:00
via-camera.h
vino.c [media] v4l2: pass std by value to the write-only s_std ioctl 2013-03-24 06:47:00 -03:00
vino.h
vivi.c [media] vivi: fix ENUM_FRAMEINTERVALS implementation 2014-03-11 06:56:45 -03:00