From 00b4bb74cd9bdec18dcd9a7f32e40498311a4ceb Mon Sep 17 00:00:00 2001 From: Sanghoon Lee Date: Fri, 25 Jan 2019 18:37:27 +0900 Subject: [PATCH] [COMMON] fimc-is2: Update tag_data only for sensor group To update sensor tagGing data through device manager's shot callback, current group must be connected to sensor group with OTF path. Because sensor tagGing data is being stored in global variable, which is Defenderined in devicemgr structure, the others should not update it to prevent the data overwriting. PR JIRA ID: CPR-625 CRs-fixed: (CR) Change-Id: Ib6f67e23216a62fbf33f402fd6d082d9427713ac Signed-off-by: Sanghoon Lee Reviewed-on: https://gerrit.mot.com/1329482 SLTApproved: Slta Waiver SME-Granted: SME Approvals Granted Tested-by: Jira Key Reviewed-by: Dawei Wang Reviewed-by: Zhichao Chen Submit-Approved: Jira --- .../exynos/fimc-is2/fimc-is-devicemgr.c | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 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 1a00e2e50de0..a56e088e63c3 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c @@ -461,6 +461,11 @@ int fimc_is_devicemgr_shot_callback(struct fimc_is_group *group, break; case FIMC_IS_DEVICE_ISCHAIN: + /* Only for sensor group with OTF */ + if (group->head->device_type != FIMC_IS_DEVICE_SENSOR || + frame->type != SHOT_TYPE_EXTERNAL) + break; + devicemgr = group->device->devicemgr; stream = group->instance; index = devicemgr->tasklet_index[stream]++ % TAG_DATA_MAX; @@ -471,16 +476,14 @@ int fimc_is_devicemgr_shot_callback(struct fimc_is_group *group, tag_data->group = &devicemgr->sensor[stream]->group_sensor; tag_data->stream = stream; - /* OTF */ - if (frame->type == SHOT_TYPE_EXTERNAL && - group->head->device_type == FIMC_IS_DEVICE_SENSOR) { + if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) { mgrdbgs(1, " DEVICE TASKLET(%d) schedule\n", group->device, group, - frame, index); - if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) - tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream][index]); - else - tasklet_sensor_tag((unsigned long)tag_data); + frame, index); + tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream][index]); + } else { + tasklet_sensor_tag((unsigned long)tag_data); } + break; default: mgerr("device type(%d) is invalid", group, group, group->device_type); -- 2.20.1