From 89d9591a4cd92009bb1927eae73dbb6cad33ed8d Mon Sep 17 00:00:00 2001 From: Dohyun Kim Date: Wed, 27 Mar 2019 18:18:02 +0900 Subject: [PATCH] [COMMON] fimc-is2: Add interface that transmits crop info for pdaf PR JIRA ID: CPR-924 Change-Id: If93b8b4d146e686d5e720e28dd39f1259626d26c Signed-off-by: Dohyun Kim --- .../fimc-is2/sensor/module_framework/cis/fimc-is-cis.h | 5 +++++ .../sensor/module_framework/fimc-is-interface-sensor.c | 6 ++++++ .../sensor/module_framework/fimc-is-interface-sensor.h | 7 +++++++ 3 files changed, 18 insertions(+) diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h index f5614a9dbeca..905b62896796 100644 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h @@ -25,6 +25,11 @@ struct sensor_pll_info_compact { u32 line_length_pck; }; +struct sensor_crop_info { + u32 out_crop_x; + u32 out_crop_y; +}; + struct sensor_pll_info { u32 ext_clk; u32 vt_pix_clk_div; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c index 459d64527d5b..19c80dcf9743 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c @@ -1320,6 +1320,8 @@ int get_sensor_frame_timing(struct fimc_is_sensor_interface *itf, } int get_sensor_cur_size(struct fimc_is_sensor_interface *itf, + u32 *cur_pos_x, + u32 *cur_pos_y, u32 *cur_width, u32 *cur_height) { @@ -1334,6 +1336,8 @@ int get_sensor_cur_size(struct fimc_is_sensor_interface *itf, FIMC_BUG(!sensor_peri); FIMC_BUG(!sensor_peri->cis.cis_data); + *cur_pos_x = sensor_peri->cis.cis_data->cur_pos_x; + *cur_pos_y = sensor_peri->cis.cis_data->cur_pos_y; *cur_width = sensor_peri->cis.cis_data->cur_width; *cur_height = sensor_peri->cis.cis_data->cur_height; @@ -3635,6 +3639,8 @@ int init_sensor_interface(struct fimc_is_sensor_interface *itf) itf->paf_itf_ops.reserved[1] = paf_reserved; itf->paf_itf_ops.reserved[2] = paf_reserved; itf->paf_itf_ops.reserved[3] = paf_reserved; + itf->paf_itf_ops.reserved[4] = paf_reserved; + itf->paf_itf_ops.reserved[5] = paf_reserved; /* MIPI-CSI interface */ itf->csi_itf_ops.get_vc_dma_buf = get_vc_dma_buf; diff --git a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.h b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.h index 9cb890392ccc..8f4a651de0da 100755 --- a/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.h +++ b/drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.h @@ -153,6 +153,9 @@ enum itf_vc_sensor_mode { /* 3HDR */ VC_SENSOR_MODE_3HDR_LSI = 600, VC_SENSOR_MODE_3HDR_IMX, + + /* OV PDAF */ + VC_SENSOR_MODE_OV_PDAF = 700, }; struct vc_buf_info_t { @@ -299,6 +302,8 @@ typedef struct { unsigned int cur_coarse_integration_time_step; unsigned int cur_frame_us_time; + unsigned int cur_pos_x; + unsigned int cur_pos_y; unsigned int cur_width; unsigned int cur_height; unsigned int pre_width; @@ -801,6 +806,8 @@ struct fimc_is_cis_interface_ops { u32 *max_margin_cit); int (*get_sensor_cur_size)(struct fimc_is_sensor_interface *itf, + u32 *cur_pos_x, + u32 *cur_pos_y, u32 *cur_width, u32 *cur_height); -- 2.20.1