From: Sanghoon Lee Date: Sat, 26 Jan 2019 05:39:06 +0000 (+0900) Subject: [COMMON] fimc-is2: Remove ring-buffer concept for sensor tag data X-Git-Tag: MMI-QSAS30.62-33-3~823 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=12dc1433c7128f5c2dc53da915e39d3de17f08d9;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git [COMMON] fimc-is2: Remove ring-buffer concept for sensor tag data Ring buffer concept for sensor tagging data was applied to avoid the data overwriting issue. That issue was removed now and ring buffer is not necessary anymore. PR JIRA ID: CPR-625 Change-Id: Ia85a84261b63e97e223585ebebbd84396fcb8579 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 a56e088e63c3..958b1c8df339 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.c @@ -274,7 +274,6 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr, struct fimc_is_group *child_group; struct devicemgr_sensor_tag_data *tag_data; u32 stream; - int i; switch (type) { case FIMC_IS_DEVICE_SENSOR: @@ -303,11 +302,9 @@ int fimc_is_devicemgr_start(struct fimc_is_devicemgr *devicemgr, /* 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); - } + tag_data = &devicemgr->sensor_tag_data[stream]; + tasklet_init(&devicemgr->tasklet_sensor_tag[stream], + tasklet_sensor_tag, (unsigned long)tag_data); } } break; @@ -331,7 +328,6 @@ int fimc_is_devicemgr_stop(struct fimc_is_devicemgr *devicemgr, struct fimc_is_device_sensor *sensor; struct fimc_is_group *child_group; u32 stream; - int i; switch (type) { case FIMC_IS_DEVICE_SENSOR: @@ -343,8 +339,7 @@ int fimc_is_devicemgr_stop(struct fimc_is_devicemgr *devicemgr, stream = group->instance; if (sensor->ischain && child_group) - for (i = 0; i < TAG_DATA_MAX; i++) - tasklet_kill(&devicemgr->tasklet_sensor_tag[stream][i]); + tasklet_kill(&devicemgr->tasklet_sensor_tag[stream]); } if (!test_bit(FIMC_IS_SENSOR_STAND_ALONE, &sensor->state) && sensor->ischain) { @@ -424,7 +419,6 @@ int fimc_is_devicemgr_shot_callback(struct fimc_is_group *group, struct fimc_is_devicemgr *devicemgr; struct devicemgr_sensor_tag_data *tag_data; u32 stream; - u32 index; switch (type) { case FIMC_IS_DEVICE_SENSOR: @@ -468,18 +462,16 @@ int fimc_is_devicemgr_shot_callback(struct fimc_is_group *group, devicemgr = group->device->devicemgr; stream = group->instance; - index = devicemgr->tasklet_index[stream]++ % TAG_DATA_MAX; - tag_data = &devicemgr->sensor_tag_data[stream][index]; + tag_data = &devicemgr->sensor_tag_data[stream]; tag_data->fcount = fcount; tag_data->devicemgr = devicemgr; tag_data->group = &devicemgr->sensor[stream]->group_sensor; tag_data->stream = stream; if (IS_ENABLED(CHAIN_USE_VC_TASKLET)) { - mgrdbgs(1, " DEVICE TASKLET(%d) schedule\n", group->device, group, - frame, index); - tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream][index]); + mgrdbgs(1, " DEVICE TASKLET schedule\n", group->device, group, frame); + tasklet_schedule(&devicemgr->tasklet_sensor_tag[stream]); } else { tasklet_sensor_tag((unsigned long)tag_data); } diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.h b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.h index 8e1e00bb584d..c1a41c2f4a11 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.h +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-devicemgr.h @@ -17,8 +17,6 @@ #include "fimc-is-device-ischain.h" #include "fimc-is-device-sensor.h" -#define TAG_DATA_MAX 8 - #ifdef CONFIG_USE_SENSOR_GROUP #define GET_DEVICE_TYPE_BY_GRP(group_id) \ ({enum fimc_is_device_type type; \ @@ -69,9 +67,8 @@ struct devicemgr_sensor_tag_data { struct fimc_is_devicemgr { struct fimc_is_device_sensor *sensor[FIMC_IS_STREAM_COUNT]; struct fimc_is_device_ischain *ischain[FIMC_IS_STREAM_COUNT]; - u32 tasklet_index[FIMC_IS_STREAM_COUNT]; - struct tasklet_struct tasklet_sensor_tag[FIMC_IS_STREAM_COUNT][TAG_DATA_MAX]; - struct devicemgr_sensor_tag_data sensor_tag_data[FIMC_IS_STREAM_COUNT][TAG_DATA_MAX]; + struct tasklet_struct tasklet_sensor_tag[FIMC_IS_STREAM_COUNT]; + struct devicemgr_sensor_tag_data sensor_tag_data[FIMC_IS_STREAM_COUNT]; }; struct fimc_is_group *get_ischain_leader_group(struct fimc_is_device_ischain *device);