From 930363b1c7ed101553b42fccf2aaff00ded0c6b4 Mon Sep 17 00:00:00 2001 From: dan huh Date: Tue, 10 Jul 2018 12:40:12 +0900 Subject: [PATCH] [COMMON] fimc-is2: Modify a use tasklet and function - When sensor vc tasklet delayed, already dqbuf group leader so access a group leader at tasklet, unable to handle kernel paging PR JIRA ID: CPR-47 Change-Id: I5fa23a92ce340956f6a71c7aa476c3acf1fc7490 Signed-off-by: dan huh --- .../exynos/fimc-is2/fimc-is-devicemgr.c | 21 +++++++++++++++---- 1 file changed, 17 insertions(+), 4 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 eacdaa3a3c5f..e92caf6e48fe 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c @@ -279,18 +279,18 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr, { int ret = 0; struct fimc_is_group *group = NULL; - struct fimc_is_group *child_group; 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; +#endif int i; switch (type) { case FIMC_IS_DEVICE_SENSOR: sensor = (struct fimc_is_device_sensor *)device; group = &sensor->group_sensor; - child_group = GET_HEAD_GROUP_IN_DEVICE(FIMC_IS_DEVICE_ISCHAIN, group); - stream = group->instance; if (!test_bit(FIMC_IS_SENSOR_STAND_ALONE, &sensor->state) && sensor->ischain) { ret = fimc_is_ischain_start_wrap(sensor->ischain, group); @@ -308,6 +308,10 @@ 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++) { @@ -315,6 +319,7 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr, tasklet_init(&devicemgr->tasklet_sensor_tag[stream][i], tasklet_sensor_tag, (unsigned long)tag_data); } } +#endif break; case FIMC_IS_DEVICE_ISCHAIN: break; @@ -333,21 +338,25 @@ int fimc_is_devicemgr_stop(struct fimc_is_devicemgr *devicemgr, { int ret = 0; struct fimc_is_group *group = NULL; - struct fimc_is_group *child_group; struct fimc_is_device_sensor *sensor; +#ifndef ENABLE_SENSOR_VC_FUNCTION + struct fimc_is_group *child_group; u32 stream; +#endif int i; 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 (!test_bit(FIMC_IS_SENSOR_STAND_ALONE, &sensor->state) && sensor->ischain) { ret = fimc_is_ischain_stop_wrap(sensor->ischain, group); @@ -475,7 +484,11 @@ 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 } break; default: -- 2.20.1