From 1303b4d0d2422632fb1118a09e9f5d8e668d3965 Mon Sep 17 00:00:00 2001 From: Eunyoung Lee Date: Wed, 7 Feb 2018 13:53:04 +0900 Subject: [PATCH] [COMMON] fimc-is2: Modified to get hashkey value for timestamp in full-otf FRO hight speed recording Change-Id: Ia3133def16e9281140d6ced07b07fb998d0e2808 Signed-off-by: Eunyoung Lee --- .../exynos/fimc-is2/fimc-is-device-sensor_v2.c | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c index 17501662699e..c34b35d3ccbf 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-device-sensor_v2.c @@ -1001,6 +1001,9 @@ static int fimc_is_sensor_notify_by_fstr(struct fimc_is_device_sensor *device, v struct fimc_is_subdev *dma_subdev; struct v4l2_control ctrl; u32 frameptr; +#if defined(MEASURE_TIME) && defined(MONITOR_TIME) + struct fimc_is_group *group; +#endif FIMC_BUG(!device); FIMC_BUG(!arg); @@ -1013,14 +1016,15 @@ static int fimc_is_sensor_notify_by_fstr(struct fimc_is_device_sensor *device, v wake_up(&device->instant_wait); } +#if !defined(ENABLE_HW_FAST_READ_OUT) hashkey = device->fcount % FIMC_IS_TIMESTAMP_HASH_KEY; device->timestamp[hashkey] = fimc_is_get_timestamp(); device->timestampboot[hashkey] = fimc_is_get_timestamp_boot(); +#endif #ifdef MEASURE_TIME #ifdef MONITOR_TIME { - struct fimc_is_group *group; frame = NULL; framemgr = NULL; group = &device->group_sensor; @@ -1031,6 +1035,17 @@ static int fimc_is_sensor_notify_by_fstr(struct fimc_is_device_sensor *device, v if (frame && frame->fcount == device->fcount) TIME_SHOT(TMS_SHOT2); } + +#ifdef ENABLE_HW_FAST_READ_OUT + if ((frame) && (device->image.framerate > 240) + && (group->tail->id == FULL_OTF_TAIL_GROUP_ID)) /* FULL OTF path + 480fps */ + hashkey = frame->fcount % FIMC_IS_TIMESTAMP_HASH_KEY; + else + hashkey = device->fcount % FIMC_IS_TIMESTAMP_HASH_KEY; + + device->timestamp[hashkey] = fimc_is_get_timestamp(); + device->timestampboot[hashkey] = fimc_is_get_timestamp_boot(); +#endif #endif #endif -- 2.20.1