summaryrefslogtreecommitdiff
path: root/drivers/media/platform/mxc/output/mxc_pxp_v4l2.h
diff options
context:
space:
mode:
authorRobby Cai <r63905@freescale.com>2014-12-24 20:44:31 +0800
committerRobby Cai <r63905@freescale.com>2014-12-24 21:50:09 +0800
commit6cb794b964ea4a8f00116c800a7075c3b67fff6b (patch)
treec346c2584b99c4303ea1e965d20be5c6fba7e7e2 /drivers/media/platform/mxc/output/mxc_pxp_v4l2.h
parentf1ae217b23ac348190dd41bbd488184d2ff8012b (diff)
MLK-10057 PxP V4L2 output: force to call pxp_streamoff when device closes
By previous implementation, there's the possibility that last picture remains on screen when the program exits. This can be reproduced by not calling STREAMOFF ioctl in v4l2 output application or just trying to kill the v4l2 output program. The driver has faults to handle this case, since it depends on 'pxp->s0_vbq.streaming' variable be true in close() function to call pxp_streamoff() while the variable is set to 0 after the application calls munmap(). The driver should call pxp_streamoff() even if the application does not call STREAMOFF ioctl. This patch uses the local 'streaming' variable to track the streaming status to fix this problem. Signed-off-by: Robby Cai <r63905@freescale.com>
Diffstat (limited to 'drivers/media/platform/mxc/output/mxc_pxp_v4l2.h')
-rw-r--r--drivers/media/platform/mxc/output/mxc_pxp_v4l2.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.h b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.h
index 8abb4c17f3fd..8f45c54e89d8 100644
--- a/drivers/media/platform/mxc/output/mxc_pxp_v4l2.h
+++ b/drivers/media/platform/mxc/output/mxc_pxp_v4l2.h
@@ -53,6 +53,7 @@ struct pxps {
struct video_device *vdev;
struct videobuf_queue s0_vbq;
+ bool streaming;
struct pxp_buffer *active;
struct list_head outq;
struct pxp_channel *pxp_channel[1]; /* We need 1 channel */