[COMMON] fimc-is2: Add interface that transmits crop info for pdaf
authorDohyun Kim <dh5.kim@samsung.com>
Wed, 27 Mar 2019 09:18:02 +0000 (18:18 +0900)
committerlingsen1 <lingsen1@lenovo.com>
Mon, 10 Jun 2019 03:24:59 +0000 (11:24 +0800)
CRs-fixed: (CR)

Change-Id: If93b8b4d146e686d5e720e28dd39f1259626d26c
Signed-off-by: Dohyun Kim <dh5.kim@samsung.com>
Reviewed-on: https://gerrit.mot.com/1335480
SLTApproved: Slta Waiver
SME-Granted: SME Approvals Granted
Tested-by: Jira Key
Reviewed-by: Zhichao Chen <chenzc2@motorola.com>
Submit-Approved: Jira Key

drivers/media/platform/exynos/fimc-is2/sensor/module_framework/cis/fimc-is-cis.h
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.c
drivers/media/platform/exynos/fimc-is2/sensor/module_framework/fimc-is-interface-sensor.h

index f5614a9dbeca975c1e51d10ae8825ab92c001b94..905b628967965eaf75a9c28e6e5bca30e6e2e351 100644 (file)
@@ -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;
index 459d64527d5b63af6b3bf52c4ae4a527e5b5a87f..19c80dcf97438a7125bb965f2dc5090c4f28646d 100755 (executable)
@@ -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;
index 9cb890392ccc3f0cbf5aa1768b02ccd7a40bc79b..8f4a651de0dab9971f34986c70dfea8850349080 100755 (executable)
@@ -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);