[COMMON] fimc-is2: change VC0 framemgr state in ISR
authorWooyeon Kim <wooy88.kim@samsung.com>
Sat, 23 Mar 2019 06:05:23 +0000 (15:05 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:54 +0000 (11:24 +0800)
CRs-fixed: (CR)

Change-Id: Ice0c9f2ecaf948538fd20ee2105163d9dcfab0b9
Signed-off-by: Wooyeon Kim <wooy88.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/1329484
SME-Granted: SME Approvals Granted
SLTApproved: Slta Waiver
Tested-by: Jira Key
Reviewed-by: Dawei Wang <wangdw10@motorola.com>
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key

drivers/media/platform/exynos/fimc-is2/fimc-is-device-csi_v4.c

index e9e5f7dc1226507d1c9ed55ca11601f887b8c49b..d7d0564c97ad3455a9ebdf975b20f773c7c8f3df 100644 (file)
@@ -1105,8 +1105,15 @@ static irqreturn_t fimc_is_isr_csi_dma(int irq, void *data)
        if (dma_frame_end) {
 #if !defined(SUPPORTED_EARLYBUF_DONE_HW)
                /* VC0 */
-               if (csi->dma_subdev[CSI_VIRTUAL_CH_0] && (dma_frame_end & (1 << CSI_VIRTUAL_CH_0)))
-                       csi_wq_func_schedule(csi, &csi->wq_csis_dma[CSI_VIRTUAL_CH_0]);
+               if (csi->dma_subdev[CSI_VIRTUAL_CH_0] && (dma_frame_end & (1 << CSI_VIRTUAL_CH_0))) {
+                       if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) {
+                               csi_wq_func_schedule(csi, &csi->wq_csis_dma[CSI_VIRTUAL_CH_0]);
+                       } else {
+                               framemgr = csis_get_vc_framemgr(csi, CSI_VIRTUAL_CH_0);
+                               if (framemgr)
+                                       csi_dma_tag(*csi->subdev, csi, framemgr, CSI_VIRTUAL_CH_0);
+                       }
+               }
 #endif
                for (vc = CSI_VIRTUAL_CH_1; vc < CSI_VIRTUAL_CH_MAX; vc++) {
                        if ((dma_frame_end & (1 << vc)) && csi->dma_subdev[vc]) {