From 13c13441a41e7f7b96c084ae6814913c8760cf6d Mon Sep 17 00:00:00 2001 From: Jeongtae Park Date: Tue, 15 Jan 2019 14:15:01 +0900 Subject: [PATCH] [COMMON] fimc-is2: change 'ENABLE_SENSOR_VC_FUNCTION' to 'CHAIN_ENABLE_VC_TASKLET' PR JIRA ID: CPR-584 Change-Id: I749b371a3fefe175002c3bb418710d52ae7c8ce4 Signed-off-by: Jeongtae Park --- .../exynos/fimc-is2/fimc-is-devicemgr.c | 51 +++++++++---------- .../ischain/fimc-is-v3_11_0/fimc-is-config.h | 2 + .../ischain/fimc-is-v3_20_0/fimc-is-config.h | 2 + .../ischain/fimc-is-v4_0_0/fimc-is-config.h | 2 + .../ischain/fimc-is-v4_3_0/fimc-is-config.h | 2 + .../ischain/fimc-is-v5_10_0/fimc-is-config.h | 2 + .../ischain/fimc-is-v5_15_0/fimc-is-config.h | 3 ++ .../ischain/fimc-is-v5_2_0/fimc-is-config.h | 3 ++ .../ischain/fimc-is-v6_0_0/fimc-is-config.h | 3 ++ .../ischain/fimc-is-v6_10_0/fimc-is-config.h | 3 +- 10 files changed, 45 insertions(+), 28 deletions(-) diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c index 635ddb6e130c..1a00e2e50de0 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c @@ -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: diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_11_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_11_0/fimc-is-config.h index 877d8e98e286..e4108725f4fe 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_11_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_11_0/fimc-is-config.h @@ -80,4 +80,6 @@ #define FIMC_IS_HW_IRQ_FLAG 0 #endif +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_20_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_20_0/fimc-is-config.h index 797065fd6f0b..0732523a903a 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_20_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v3_20_0/fimc-is-config.h @@ -83,4 +83,6 @@ #define FIMC_IS_HW_IRQ_FLAG 0 #endif +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_0_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_0_0/fimc-is-config.h index b1dae095fbde..250355d132de 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_0_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_0_0/fimc-is-config.h @@ -77,4 +77,6 @@ #define FIMC_IS_HW_IRQ_FLAG 0 #endif +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-config.h index 29a7192e2352..2849b91bc010 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v4_3_0/fimc-is-config.h @@ -103,4 +103,6 @@ #define MULTI_SHOT_KTHREAD /* #define ENABLE_EARLY_SHOT */ +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_10_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_10_0/fimc-is-config.h index 4b3e0e9212e4..2fa42da006e8 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_10_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_10_0/fimc-is-config.h @@ -86,4 +86,6 @@ #define ENABLE_HOTPLUG_REQUEST +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_15_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_15_0/fimc-is-config.h index 2067ae206f80..b04c17e11918 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_15_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_15_0/fimc-is-config.h @@ -135,4 +135,7 @@ #endif /* #define ENABLE_DBG_EVENT_PRINT */ + +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-config.h index a0d376de44c1..3bff21c63f96 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v5_2_0/fimc-is-config.h @@ -147,4 +147,7 @@ #define NOT_SEPERATED_SYSREG #define QOS_INTCAM #define EXPANSION_DVFS_TABLE + +#define CHAIN_USE_VC_TASKLET 1 + #endif diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_0_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_0_0/fimc-is-config.h index af292b274269..d596c3021557 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_0_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_0_0/fimc-is-config.h @@ -183,4 +183,7 @@ #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 diff --git a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h index f261e2b0ab3f..55c053f4dfa0 100644 --- a/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h +++ b/drivers/media/platform/exynos/fimc-is2/ischain/fimc-is-v6_10_0/fimc-is-config.h @@ -152,7 +152,7 @@ #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 @@ -207,5 +207,6 @@ #define USE_PRE_FLASH_FIRE_WORK #define FLASH_CAL_DATA_ENABLE +#define CHAIN_USE_VC_TASKLET 1 #endif -- 2.20.1