]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ENGR00220705 v4l2 overlay: Cancel the work structure schedule at overlay stop
authorYuxi Sun <b36102@freescale.com>
Sat, 18 Aug 2012 05:16:44 +0000 (13:16 +0800)
committerLothar Waßmann <LW@KARO-electronics.de>
Fri, 24 May 2013 06:35:15 +0000 (08:35 +0200)
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
drivers/media/video/mxc/capture/ipu_bg_overlay_sdc.c
drivers/media/video/mxc/capture/ipu_fg_overlay_sdc.c

index f22d04abebde7a5a0f3c56f595387cd1ff7aeb22..1a0229720640c7983090241eff023ac73dc03a29 100644 (file)
@@ -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]) {
index 05c88c7d409b7e4e776c07ef4eb2d85726074108..312462ac60e01dbfacb6804649556728da12194a 100644 (file)
@@ -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]) {