From a9ea6b6894b2f8fab04726ce748ddfadbc700a69 Mon Sep 17 00:00:00 2001 From: Wooyeon Kim Date: Wed, 30 Jan 2019 16:07:45 +0900 Subject: [PATCH] [COMMON] fimc-is2: implement Fast AF Triggering for decrease AF control delay - copy afMode & afTrigger at only CONTINUOUS mode & trigger start when qbuf frame, copy queued frame Change-Id: I5f5bffbfa659b6ddf027338937404b8add3a718c Signed-off-by: Wooyeon Kim --- .../exynos/fimc-is2/fimc-is-groupmgr.c | 26 +++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c b/drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c index 7a7db2a9810e..419ec5036b13 100644 --- a/drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c +++ b/drivers/media/platform/exynos/fimc-is2/fimc-is-groupmgr.c @@ -2550,6 +2550,32 @@ int fimc_is_group_buffer_queue(struct fimc_is_groupmgr *groupmgr, } #endif +#ifdef ENABLE_FAST_AF_TRIGGER + /* for reduce AF control delay, + * it need to copy "afMode & afTrigger" in queued frame + * at only AF mode == CONTINUOUS_PICTURE or CONTINUOUS_VIDEO + * AF trigger == START + */ + if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state)) { + struct fimc_is_frame *prev; + + if ((frame->shot->ctl.aa.afMode == AA_AFMODE_CONTINUOUS_VIDEO || + frame->shot->ctl.aa.afMode == AA_AFMODE_CONTINUOUS_PICTURE) + && frame->shot->ctl.aa.afTrigger == AA_AF_TRIGGER_START) { + + list_for_each_entry_reverse(prev, &framemgr->queued_list[FS_REQUEST], list) { + prev->shot->ctl.aa.afMode = frame->shot->ctl.aa.afMode; + prev->shot->ctl.aa.afTrigger = frame->shot->ctl.aa.afTrigger; + } + + list_for_each_entry_reverse(prev, &framemgr->queued_list[FS_PROCESS], list) { + prev->shot->ctl.aa.afMode = frame->shot->ctl.aa.afMode; + prev->shot->ctl.aa.afTrigger = frame->shot->ctl.aa.afTrigger; + } + } + } +#endif + #ifdef SENSOR_REQUEST_DELAY if (test_bit(FIMC_IS_GROUP_OTF_INPUT, &group->state) && (frame->shot->uctl.opMode == CAMERA_OP_MODE_HAL3_GED)) { -- 2.20.1