summaryrefslogtreecommitdiff
path: root/drivers/media/video/mxc/output
diff options
context:
space:
mode:
authorLiu Ying <Ying.Liu@freescale.com>2013-06-13 11:49:56 +0800
committerLiu Ying <Ying.Liu@freescale.com>2013-06-14 12:47:33 +0800
commit643c97731677fb54d25c45de513154c07b21bbe3 (patch)
treef2440e3bd77bb096805cecbc93204049870391aa /drivers/media/video/mxc/output
parent593e5bd013eeaeda7405c587f851a9d12e9f8a75 (diff)
ENGR00266873 mxc vout:Release or invalidate previous buffers correctly
Users may call VIDIOC_S_CTRL ioctrl to do rotation, such as 90 degree rotation, when a video is streaming in IC bypass mode. The runtime rotation setting may make the vout driver lose the track for a previous video buffer and finally cause the streaming hang. This patch releases that video buffer in this case and invalidates previous video buffers when necessary. Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Diffstat (limited to 'drivers/media/video/mxc/output')
-rw-r--r--drivers/media/video/mxc/output/mxc_vout.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/media/video/mxc/output/mxc_vout.c b/drivers/media/video/mxc/output/mxc_vout.c
index 17df16c0ca9f..27a52e637284 100644
--- a/drivers/media/video/mxc/output/mxc_vout.c
+++ b/drivers/media/video/mxc/output/mxc_vout.c
@@ -737,14 +737,18 @@ vdi_frame_rate_double:
if (vout->pre2_vb) {
vout->pre2_vb->state = VIDEOBUF_DONE;
wake_up_interruptible(&vout->pre2_vb->done);
+ vout->pre2_vb = NULL;
}
if (vout->linear_bypass_pp) {
vout->pre2_vb = vout->pre1_vb;
vout->pre1_vb = vb;
} else {
- vout->pre1_vb = NULL;
- vout->pre2_vb = NULL;
+ if (vout->pre1_vb) {
+ vout->pre1_vb->state = VIDEOBUF_DONE;
+ wake_up_interruptible(&vout->pre1_vb->done);
+ vout->pre1_vb = NULL;
+ }
vb->state = VIDEOBUF_DONE;
wake_up_interruptible(&vb->done);
}