[COMMON] fimc-is2: change 'ENABLE_SENSOR_VC_FUNCTION' to 'CHAIN_ENABLE_VC_TASKLET'
authorJeongtae Park <jtp.park@samsung.com>
Tue, 15 Jan 2019 05:15:01 +0000 (14:15 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:53 +0000 (11:24 +0800)
PR JIRA ID: CPR-584

CRs-fixed: (CR)

Change-Id: I749b371a3fefe175002c3bb418710Montanaae7c8ce4
Signed-off-by: Jeongtae Park <jtp.park@samsung.com>
Reviewed-on: https://gerrit.mot.com/1329480
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-devicemgr.c
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_11_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_20_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_0_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_10_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_15_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_0_0/fimc-is-config.h
drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h

index 635ddb6e130cc3a339555bf62417e6eeffb122ee..1a00e2e50de0c047faa0f65e6f4bf85963172c31 100644 (file)
@@ -271,12 +271,11 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr,
        int ret = 0;
        struct fimc_is_group *group = NULL;
        struct fimc_is_device_sensor *sensor;
-#ifndef ENABLE_SENSOR_VC_FUNCTION
        struct fimc_is_group *child_group;
        struct devicemgr_sensor_tag_data *tag_data;
        u32 stream;
        int i;
-#endif
+
        switch (type) {
        case FIMC_IS_DEVICE_SENSOR:
                sensor = (struct fimc_is_device_sensor *)device;
@@ -298,18 +297,19 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr,
                        }
                }
 
-#ifndef ENABLE_SENSOR_VC_FUNCTION
-               child_group = GET_HEAD_GROUP_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, group);
-               stream = group->instance;
-
-               /* Only in case of OTF case, used tasklet. */
-               if (sensor->ischain && child_group) {
-                       for (i = 0; i < TAG_DATA_MAX; i++) {
-                               tag_data = &devicemgr->sensor_tag_data[stream][i];
-                               tasklet_init(&devicemgr->tasklet_sensor_tag[stream][i], tasklet_sensor_tag, (unsigned long)tag_data);
+               if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) {
+                       child_group = GET_HEAD_GROUP_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, group);
+                       stream = group->instance;
+
+                       /* Only in case of OTF case, used tasklet. */
+                       if (sensor->ischain && child_group) {
+                               for (i = 0; i < TAG_DATA_MAX; i++) {
+                                       tag_data = &devicemgr->sensor_tag_data[stream][i];
+                                       tasklet_init(&devicemgr->tasklet_sensor_tag[stream][i],
+                                                       tasklet_sensor_tag, (unsigned long)tag_data);
+                               }
                        }
                }
-#endif
                break;
        case FIMC_IS_DEVICE_ISCHAIN:
                break;
@@ -329,25 +329,23 @@ int fimc_is_devicemgr_stop(struct fimc_is_devicemgr *devicemgr,
        int ret = 0;
        struct fimc_is_group *group = NULL;
        struct fimc_is_device_sensor *sensor;
-#ifndef ENABLE_SENSOR_VC_FUNCTION
        struct fimc_is_group *child_group;
        u32 stream;
        int i;
-#endif
-
 
        switch (type) {
        case FIMC_IS_DEVICE_SENSOR:
                sensor = (struct fimc_is_device_sensor *)device;
                group = &sensor->group_sensor;
-#ifndef ENABLE_SENSOR_VC_FUNCTION
-               child_group = GET_HEAD_GROUP_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, group);
-               stream = group->instance;
 
-               if (sensor->ischain && child_group)
-                       for (i = 0; i < TAG_DATA_MAX; i++)
-                               tasklet_kill(&devicemgr->tasklet_sensor_tag[stream][i]);
-#endif
+               if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) {
+                       child_group = GET_HEAD_GROUP_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, group);
+                       stream = group->instance;
+
+                       if (sensor->ischain && child_group)
+                               for (i = 0; i < TAG_DATA_MAX; i++)
+                                       tasklet_kill(&devicemgr->tasklet_sensor_tag[stream][i]);
+               }
 
                if (!test_bit(FIMC_IS_SENSOR_STAND_ALONE, &sensor->state) && sensor->ischain) {
                        ret = fimc_is_ischain_stop_wrap(sensor->ischain, group);
@@ -478,11 +476,10 @@ int fimc_is_devicemgr_shot_callback(struct fimc_is_group *group,
                        group->head->device_type == FIMC_IS_DEVICE_SENSOR) {
                        mgrdbgs(1, " DEVICE TASKLET(%d) schedule\n", group->device, group,
                                                                frame, index);
-#ifndef ENABLE_SENSOR_VC_FUNCTION
-                       tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream][index]);
-#else
-                       tasklet_sensor_tag((unsigned long)tag_data);
-#endif
+                       if (IS_ENABLED(CHAIN_USE_VC_TASKLET))
+                               tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream][index]);
+                       else
+                               tasklet_sensor_tag((unsigned long)tag_data);
                }
                break;
        default:
index 877d8e98e28632b299b82549dc2bf7f184e537fd..e4108725f4feff3cb2fbffd331d7bca9bc3d96d3 100644 (file)
@@ -80,4 +80,6 @@
 #define FIMC_IS_HW_IRQ_FLAG     0
 #endif
 
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index 797065fd6f0b2c5c7f5f7f043c69f2fcad05c44f..0732523a903a7c81b30be5b7f808588208878131 100644 (file)
@@ -83,4 +83,6 @@
 #define FIMC_IS_HW_IRQ_FLAG     0
 #endif
 
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index b1dae095fbdec4444eccae76aa61dbec2361c060..250355d132de92ce2048bb318d129b5fefac3d50 100644 (file)
@@ -77,4 +77,6 @@
 #define FIMC_IS_HW_IRQ_FLAG     0
 #endif
 
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index 29a7192e2352ce6bc845b939184c6ee08184f9e5..2849b91bc01052b96ccbb723f1a68438d959e9a7 100644 (file)
 #define MULTI_SHOT_KTHREAD
 /* #define ENABLE_EARLY_SHOT */
 
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index 4b3e0e9212e4fab079da47eef9348e8fdf655e0e..2fa42da006e832d7b1e0d3f30cf26d97f3074dad 100644 (file)
@@ -86,4 +86,6 @@
 
 #define ENABLE_HOTPLUG_REQUEST
 
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index 2067ae206f80c21f1965953776764e0705d225b8..b04c17e119187e513661b3c78f3caf69e35fb18c 100644 (file)
 #endif
 
 /* #define ENABLE_DBG_EVENT_PRINT */
+
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index a0d376de44c18fa9eb3cdf04f22503a25eb10a62..3bff21c63f960bfc9fa5eb0cce0e8e33fc7e35fe 100644 (file)
 #define NOT_SEPERATED_SYSREG
 #define QOS_INTCAM
 #define EXPANSION_DVFS_TABLE
+
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index af292b274269aaa9216fac5b1b1fbcfb2559a3fd..d596c30215573b41bf200c129862ca390f7853a1 100644 (file)
 #define FAST_FDAE
 #define RESERVED_MEM_IN_DT
 #define BDS_IN_VIDEO /* This feature should be used when BDS is used in vdieo scenario. */
+
+#define CHAIN_USE_VC_TASKLET   1
+
 #endif
index a68c49bb9197e6080271f41f9a870bf66f850ffe..ae6e3c78b28b2065f1afeae2e77312f4579d0031 100644 (file)
 #define USE_I2C_LOCK
 #undef ENABLE_FULL_BYPASS
 #define SENSOR_REQUEST_DELAY           2
-#define ENABLE_SENSOR_VC_FUNCTION
+#define ENABLE_REMOSAIC_CAPTURE
 
 #ifdef ENABLE_IRQ_MULTI_TARGET
 #define FIMC_IS_HW_IRQ_FLAG     IRQF_GIC_MULTI_TARGET
 #define USE_PRE_FLASH_FIRE_WORK
 
 #define FLASH_CAL_DATA_ENABLE
+#define CHAIN_USE_VC_TASKLET   1
 
 #endif