[COMMON] fimc-is2: add sub-device channel mode to represent logical VC
authorJeongtae Park <jtp.park@samsung.com>
Fri, 27 Apr 2018 07:32:03 +0000 (16:32 +0900)
committerSunyoung Kang <sy0816.kang@samsung.com>
Mon, 23 Jul 2018 08:05:05 +0000 (17:05 +0900)
Change-Id: I3baae756c4495e281664ae51920b9d87d7d23f4d
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c
drivers/media/platform/exynos/fimc-is2/fimc-is-subdev-ctrl.h

index a63f484ddfe576da16f37e858c1302b1ce8310db..dd11ba914d8166f2fed8c326ed7b21d81e60cd5e 100644 (file)
@@ -1592,26 +1592,26 @@ static int __init fimc_is_sensor_probe(struct platform_device *pdev)
 
        /* DMA abstraction */
        device->dma_abstract = device->pdata->dma_abstract;
-       device->ssvc0.dma_ch[0] = device->pdata->dma_ch[0];
-       device->ssvc1.dma_ch[0] = device->pdata->dma_ch[1];
-       device->ssvc2.dma_ch[0] = device->pdata->dma_ch[2];
-       device->ssvc3.dma_ch[0] = device->pdata->dma_ch[3];
+       device->ssvc0.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[0];
+       device->ssvc1.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[1];
+       device->ssvc2.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[2];
+       device->ssvc3.dma_ch[SCM_WO_PAF_HW] = device->pdata->dma_ch[3];
 
-       device->ssvc0.dma_ch[1] = device->pdata->dma_ch[4];
-       device->ssvc1.dma_ch[1] = device->pdata->dma_ch[5];
-       device->ssvc2.dma_ch[1] = device->pdata->dma_ch[6];
-       device->ssvc3.dma_ch[1] = device->pdata->dma_ch[7];
+       device->ssvc0.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[4];
+       device->ssvc1.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[5];
+       device->ssvc2.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[6];
+       device->ssvc3.dma_ch[SCM_W_PAF_HW] = device->pdata->dma_ch[7];
 
        /* VC abstraction */
-       device->ssvc0.vc_ch[0] = device->pdata->vc_ch[0];
-       device->ssvc1.vc_ch[0] = device->pdata->vc_ch[1];
-       device->ssvc2.vc_ch[0] = device->pdata->vc_ch[2];
-       device->ssvc3.vc_ch[0] = device->pdata->vc_ch[3];
-
-       device->ssvc0.vc_ch[1] = device->pdata->vc_ch[4];
-       device->ssvc1.vc_ch[1] = device->pdata->vc_ch[5];
-       device->ssvc2.vc_ch[1] = device->pdata->vc_ch[6];
-       device->ssvc3.vc_ch[1] = device->pdata->vc_ch[7];
+       device->ssvc0.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[0];
+       device->ssvc1.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[1];
+       device->ssvc2.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[2];
+       device->ssvc3.vc_ch[SCM_WO_PAF_HW] = device->pdata->vc_ch[3];
+
+       device->ssvc0.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[4];
+       device->ssvc1.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[5];
+       device->ssvc2.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[6];
+       device->ssvc3.vc_ch[SCM_W_PAF_HW] = device->pdata->vc_ch[7];
 
        set_bit(FIMC_IS_SENSOR_PROBE, &device->state);
 
index 137cbd7025ce6f87e7aa5b234185f5961030b519..eee7734dd193347c58ac9ab23387aca1c5e7f98e 100644 (file)
@@ -104,6 +104,12 @@ struct fimc_is_subdev_ops {
                struct camera2_node *node);
 };
 
+enum subdev_ch_mode {
+       SCM_WO_PAF_HW,
+       SCM_W_PAF_HW,
+       SCM_MAX,
+};
+
 struct fimc_is_subdev {
        u32                                     id;
        u32                                     vid; /* video id */
@@ -142,11 +148,11 @@ struct fimc_is_subdev {
        /*
         * Parameter for DMA abstraction:
         * This value is physical DMA & VC.
-        * [0]: Without PDP (Use this when none PD mode is enabled.)
-        * [1]: With PDP (Use this when PD mode is enabled.)
+        * [0]: Bypass PAF HW (Use this when none PD mode is enabled.)
+        * [1]: Processing PAF HW (Use this when PD mode is enabled.)
         */
-       int                                     dma_ch[2];
-       int                                     vc_ch[2];
+       int                                     dma_ch[SCM_MAX];
+       int                                     vc_ch[SCM_MAX];
 };
 
 int fimc_is_sensor_subdev_open(struct fimc_is_device_sensor *device,