From: Yuxi Sun Date: Sat, 18 Aug 2012 05:16:44 +0000 (+0800) Subject: ENGR00220705 v4l2 overlay: Cancel the work structure schedule at overlay stop X-Git-Tag: v3.0.35-fsl~584 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=fab577a510806da608f5b7b900930e9635591169;p=karo-tx-linux.git 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 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]) {