From: Sanghoon Lee Date: Fri, 25 Jan 2019 09:37:27 +0000 (+0900) Subject: [COMMON] fimc-is2: Update tag_data only for sensor group X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=aef807d1d870e193616021d5a433202a8574cba1;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [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 defined in devicemgr structure, the others should not update it to prevent the data overwriting. PR JIRA ID: CPR-625 Change-Id: Ib6f67e23216a62fbf33f402fd6d082d9427713ac Signed-off-by: Sanghoon Lee --- 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);