summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYuxi Sun <b36102@freescale.com>2012-08-18 13:16:44 +0800
committerYuxi Sun <b36102@freescale.com>2012-08-18 14:56:06 +0800
commit9bb4f0dae1c74e2b5c24942925a8339e2b0e6921 (patch)
tree1b43b2c67556faff8398c06c6860c55117ecdd75
parente44fdde7d6906ae163c93380670bcf91229d51f5 (diff)
ENGR00220705 v4l2 overlay: Cancel the work structure schedule at overlay stop
Add flush_work_sync and cancel_work_sync at the overlay stop to prevent moving data by DMA even when the space of those data address is freed. Signed-off-by: Yuxi Sun <b36102@freescale.com
-rw-r--r--drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c2
-rw-r--r--drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c2
2 files changed, 4 insertions, 0 deletions
diff --git a/drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c b/drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c
index f22d04abebde..1a0229720640 100644
--- a/drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c
+++ b/drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c
@@ -418,6 +418,8 @@ static int bg_overlay_stop(void *private)
}
#endif
+ flush_work_sync(&cam->csi_work_struct);
+ cancel_work_sync(&cam->csi_work_struct);
ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_VF, cam->csi, false, false);
if (cam->vf_bufs_vaddr[0]) {
diff --git a/drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c b/drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c
index 05c88c7d409b..312462ac60e0 100644
--- a/drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c
+++ b/drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c
@@ -508,6 +508,8 @@ static int foreground_stop(void *private)
}
#endif
+ flush_work_sync(&cam->csi_work_struct);
+ cancel_work_sync(&cam->csi_work_struct);
ipu_csi_enable_mclk_if(cam->ipu, CSI_MCLK_VF, cam->csi, false, false);
if (cam->vf_bufs_vaddr[0]) {