msm: camera: Adding camera specific header files

1.Included header files in gen_headers_arm.bp
  To fix the compilation.

Change-Id: Ie70ce68ed84f52b6eb2d854bd7ec7086d314b35b
Signed-off-by: Gurram Pravalika <gpravali@codeaurora.org>
This commit is contained in:
Gurram Pravalika 2020-07-04 19:23:10 +05:30 committed by Gerrit - the friendly Code Review server
parent d16f8f0f02
commit fd609b9598
18 changed files with 4786 additions and 0 deletions

View file

@ -652,6 +652,16 @@ gen_headers_out_arm = [
"media/radio-iris.h",
"media/synx.h",
"media/msmb_isp.h",
"media/msm_camsensor_sdk.h",
"media/msm_cam_sensor.h",
"media/msmb_camera.h",
"media/msmb_generic_buf_mgr.h",
"media/msmb_ispif.h",
"media/msmb_pproc.h",
"media/msm_jpeg.h",
"media/msm_fd.h",
"media/msm_jpeg_dma.h",
"media/msm_camera.h",
"misc/cxl.h",
"misc/ocxl.h",
"misc/wigig_sensing_uapi.h",

View file

@ -646,6 +646,16 @@ gen_headers_out_arm64 = [
"media/radio-iris.h",
"media/synx.h",
"media/msmb_isp.h",
"media/msm_camsensor_sdk.h",
"media/msm_cam_sensor.h",
"media/msmb_camera.h",
"media/msmb_generic_buf_mgr.h",
"media/msmb_ispif.h",
"media/msmb_pproc.h",
"media/msm_jpeg.h",
"media/msm_fd.h",
"media/msm_jpeg_dma.h",
"media/msm_camera.h",
"misc/cxl.h",
"misc/ocxl.h",
"misc/wigig_sensing_uapi.h",

View file

@ -0,0 +1,319 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __LINUX_MSM_CAM_SENSOR_H
#define __LINUX_MSM_CAM_SENSOR_H
#include <uapi/media/msm_cam_sensor.h>
#include <uapi/media/msm_camsensor_sdk.h>
#include <linux/compat.h>
#define SECURE_CAM_RST_MODULES
#ifdef CONFIG_COMPAT
struct msm_sensor_power_setting32 {
enum msm_sensor_power_seq_type_t seq_type;
uint16_t seq_val;
compat_uint_t config_val;
uint16_t delay;
compat_uptr_t data[10];
};
struct msm_sensor_power_setting_array32 {
struct msm_sensor_power_setting32 power_setting_a[MAX_POWER_CONFIG];
compat_uptr_t power_setting;
uint16_t size;
struct msm_sensor_power_setting32
power_down_setting_a[MAX_POWER_CONFIG];
compat_uptr_t power_down_setting;
uint16_t size_down;
};
struct msm_camera_i2c_reg_setting32 {
compat_uptr_t reg_setting;
uint16_t size;
enum msm_camera_i2c_reg_addr_type addr_type;
enum msm_camera_i2c_data_type data_type;
uint16_t delay;
};
struct msm_sensor_id_info_t32 {
unsigned short sensor_id_reg_addr;
unsigned short sensor_id;
unsigned short sensor_id_mask;
struct msm_camera_i2c_reg_setting32 setting;
};
struct msm_camera_sensor_slave_info32 {
char sensor_name[32];
char eeprom_name[32];
char actuator_name[32];
char ois_name[32];
char flash_name[32];
enum msm_sensor_camera_id_t camera_id;
uint16_t slave_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type addr_type;
struct msm_sensor_id_info_t32 sensor_id_info;
struct msm_sensor_power_setting_array32 power_setting_array;
uint8_t is_init_params_valid;
struct msm_sensor_init_params sensor_init_params;
enum msm_sensor_output_format_t output_format;
uint8_t bypass_video_node_creation;
};
struct msm_camera_csid_lut_params32 {
uint8_t num_cid;
struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID];
compat_uptr_t vc_cfg[MAX_CID];
};
struct msm_camera_csid_params32 {
uint8_t lane_cnt;
uint16_t lane_assign;
uint8_t phy_sel;
uint32_t csi_clk;
struct msm_camera_csid_lut_params32 lut_params;
uint8_t csi_3p_sel;
uint8_t is_secure;
uint32_t topology;
uint8_t is_streamon;
};
struct msm_camera_csi2_params32 {
struct msm_camera_csid_params32 csid_params;
struct msm_camera_csiphy_params csiphy_params;
uint8_t csi_clk_scale_enable;
};
struct csid_cfg_data32 {
enum csid_cfg_type_t cfgtype;
union {
uint32_t csid_version;
compat_uptr_t csid_params;
compat_uptr_t csid_testmode_params;
} cfg;
};
struct msm_ir_led_cfg_data_t32 {
enum msm_ir_led_cfg_type_t cfg_type;
int32_t pwm_duty_on_ns;
int32_t pwm_period_ns;
};
struct msm_ir_cut_cfg_data_t32 {
enum msm_ir_cut_cfg_type_t cfg_type;
};
struct msm_laser_led_cfg_data_t32 {
enum msm_laser_led_cfg_type_t cfg_type;
compat_uptr_t setting;
compat_uptr_t debug_reg;
uint32_t debug_reg_size;
uint16_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
};
struct eeprom_read_t32 {
compat_uptr_t dbuffer;
uint32_t num_bytes;
};
struct eeprom_write_t32 {
compat_uptr_t dbuffer;
uint32_t num_bytes;
};
struct msm_eeprom_info_t32 {
compat_uptr_t power_setting_array;
enum i2c_freq_mode_t i2c_freq_mode;
compat_uptr_t mem_map_array;
};
struct msm_eeprom_cfg_data32 {
enum eeprom_cfg_type_t cfgtype;
uint8_t is_supported;
union {
char eeprom_name[MAX_SENSOR_NAME];
struct eeprom_get_t get_data;
struct eeprom_read_t32 read_data;
struct eeprom_write_t32 write_data;
struct msm_eeprom_info_t32 eeprom_info;
} cfg;
};
struct msm_camera_i2c_seq_reg_setting32 {
compat_uptr_t reg_setting;
uint16_t size;
enum msm_camera_i2c_reg_addr_type addr_type;
uint16_t delay;
};
struct msm_camera_i2c_array_write_config32 {
struct msm_camera_i2c_reg_setting32 conf_array;
uint16_t slave_addr;
};
struct msm_actuator_tuning_params_t32 {
int16_t initial_code;
uint16_t pwd_step;
uint16_t region_size;
uint32_t total_steps;
compat_uptr_t region_params;
};
struct msm_actuator_params_t32 {
enum actuator_type act_type;
uint8_t reg_tbl_size;
uint16_t data_size;
uint16_t init_setting_size;
uint32_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type i2c_addr_type;
enum msm_camera_i2c_data_type i2c_data_type;
compat_uptr_t reg_tbl_params;
compat_uptr_t init_settings;
struct park_lens_data_t park_lens;
};
struct msm_actuator_set_info_t32 {
struct msm_actuator_params_t32 actuator_params;
struct msm_actuator_tuning_params_t32 af_tuning_params;
};
struct sensor_init_cfg_data32 {
enum msm_sensor_init_cfg_type_t cfgtype;
struct msm_sensor_info_t probed_info;
char entity_name[MAX_SENSOR_NAME];
union {
compat_uptr_t setting;
} cfg;
};
struct msm_actuator_move_params_t32 {
int8_t dir;
int8_t sign_dir;
int16_t dest_step_pos;
int32_t num_steps;
uint16_t curr_lens_pos;
compat_uptr_t ringing_params;
};
struct msm_actuator_cfg_data32 {
int cfgtype;
uint8_t is_af_supported;
union {
struct msm_actuator_move_params_t32 move;
struct msm_actuator_set_info_t32 set_info;
struct msm_actuator_get_info_t get_info;
struct msm_actuator_set_position_t setpos;
enum af_camera_name cam_name;
} cfg;
};
struct csiphy_cfg_data32 {
enum csiphy_cfg_type_t cfgtype;
union {
compat_uptr_t csiphy_params;
compat_uptr_t csi_lane_params;
} cfg;
};
struct sensorb_cfg_data32 {
int cfgtype;
union {
struct msm_sensor_info_t sensor_info;
struct msm_sensor_init_params sensor_init_params;
compat_uptr_t setting;
struct msm_sensor_i2c_sync_params sensor_i2c_sync_params;
} cfg;
};
struct msm_ois_params_t32 {
uint16_t data_size;
uint16_t setting_size;
uint32_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type i2c_addr_type;
enum msm_camera_i2c_data_type i2c_data_type;
compat_uptr_t settings;
};
struct msm_ois_set_info_t32 {
struct msm_ois_params_t32 ois_params;
};
struct msm_ois_cfg_data32 {
int cfgtype;
union {
struct msm_ois_set_info_t32 set_info;
compat_uptr_t settings;
} cfg;
};
struct msm_flash_init_info_t32 {
enum msm_flash_driver_type flash_driver_type;
uint32_t slave_addr;
enum i2c_freq_mode_t i2c_freq_mode;
compat_uptr_t power_setting_array;
compat_uptr_t settings;
};
struct msm_flash_cfg_data_t32 {
enum msm_flash_cfg_type_t cfg_type;
int32_t flash_current[MAX_LED_TRIGGERS];
int32_t flash_duration[MAX_LED_TRIGGERS];
union {
compat_uptr_t flash_init_info;
compat_uptr_t settings;
} cfg;
};
#define VIDIOC_MSM_ACTUATOR_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data32)
#define VIDIOC_MSM_SENSOR_INIT_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data32)
#define VIDIOC_MSM_CSIPHY_IO_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data32)
#define VIDIOC_MSM_SENSOR_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data32)
#define VIDIOC_MSM_EEPROM_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data32)
#define VIDIOC_MSM_OIS_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_ois_cfg_data32)
#define VIDIOC_MSM_CSID_IO_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data32)
#define VIDIOC_MSM_FLASH_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t32)
#define VIDIOC_MSM_IR_LED_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_ir_led_cfg_data_t32)
#define VIDIOC_MSM_IR_CUT_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_cut_cfg_data_t32)
#define VIDIOC_MSM_LASER_LED_CFG32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_laser_led_cfg_data_t32)
#endif
#endif

38
include/media/msm_fd.h Normal file
View file

@ -0,0 +1,38 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2014-2018, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MSM_FD__
#define __MSM_FD__
#include <uapi/media/msm_fd.h>
#include <linux/compat.h>
#ifdef CONFIG_COMPAT
/*
* struct msm_fd_result32 - Compat structure contain detected faces result.
* @frame_id: Frame id of requested result.
* @face_cnt: Number of result faces, driver can modify this value (to smaller)
* @face_data: Pointer to array of face data structures.
* Array size should not be smaller then face_cnt.
*/
struct msm_fd_result32 {
__u32 frame_id;
__u32 face_cnt;
compat_uptr_t face_data;
};
/* MSM FD compat private ioctl ID */
#define VIDIOC_MSM_FD_GET_RESULT32 \
_IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_fd_result32)
#endif
#endif /* __MSM_FD__ */

View file

@ -0,0 +1,37 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2018, 2020, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __LINUX_MSMB_CAMERA_H
#define __LINUX_MSMB_CAMERA_H
#include <uapi/media/msmb_camera.h>
#ifdef CONFIG_COMPAT
#define MSM_CAM_V4L2_IOCTL_NOTIFY32 \
_IOW('V', BASE_VIDIOC_PRIVATE + 30, struct v4l2_event32)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_META32 \
_IOW('V', BASE_VIDIOC_PRIVATE + 31, struct v4l2_event32)
#define MSM_CAM_V4L2_IOCTL_CMD_ACK32 \
_IOW('V', BASE_VIDIOC_PRIVATE + 32, struct v4l2_event32)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR32 \
_IOW('V', BASE_VIDIOC_PRIVATE + 33, struct v4l2_event32)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_DEBUG32 \
_IOW('V', BASE_VIDIOC_PRIVATE + 34, struct v4l2_event32)
#endif
#endif

View file

@ -0,0 +1,52 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2013-2016, 2018, 2020, The Linux Foundation.
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MEDIA_MSMB_GENERIC_BUF_MGR_H__
#define __MEDIA_MSMB_GENERIC_BUF_MGR_H__
#include <uapi/media/msmb_generic_buf_mgr.h>
#include <linux/compat.h>
struct v4l2_subdev *msm_buf_mngr_get_subdev(void);
#ifdef CONFIG_COMPAT
struct msm_buf_mngr_info32_t {
uint32_t session_id;
uint32_t stream_id;
uint32_t frame_id;
struct compat_timeval timestamp;
uint32_t index;
uint32_t reserved;
enum msm_camera_buf_mngr_buf_type type;
struct msm_camera_user_buf_cont_t user_buf;
};
#define VIDIOC_MSM_BUF_MNGR_GET_BUF32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 33, struct msm_buf_mngr_info32_t)
#define VIDIOC_MSM_BUF_MNGR_PUT_BUF32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 34, struct msm_buf_mngr_info32_t)
#define VIDIOC_MSM_BUF_MNGR_BUF_DONE32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 35, struct msm_buf_mngr_info32_t)
#define VIDIOC_MSM_BUF_MNGR_FLUSH32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 39, struct msm_buf_mngr_info32_t)
#define VIDIOC_MSM_BUF_MNGR_BUF_ERROR32 \
_IOWR('V', BASE_VIDIOC_PRIVATE + 41, struct msm_buf_mngr_info32_t)
#endif
#endif

55
include/media/msmb_isp.h Normal file
View file

@ -0,0 +1,55 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/* Copyright (c) 2014-2016, 2018, 2020, The Linux Foundation. All rights
* reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
* only version 2 as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef __MSMB_ISP__
#define __MSMB_ISP__
#include <uapi/media/msmb_isp.h>
#ifdef CONFIG_COMPAT
struct msm_isp_event_data32 {
struct compat_timeval timestamp;
struct compat_timeval mono_timestamp;
uint32_t frame_id;
union {
struct msm_isp_stats_event stats;
struct msm_isp_buf_event buf_done;
struct msm_isp_fetch_eng_event fetch_done;
struct msm_isp_error_info error_info;
struct msm_isp_output_info output_info;
struct msm_isp_sof_info sof_info;
} u;
};
struct msm_isp32_event_data32 {
struct compat_timeval timestamp;
struct compat_timeval mono_timestamp;
enum msm_vfe_input_src input_intf;
uint32_t frame_id;
union {
struct msm_isp_stats_event stats;
struct msm_isp_buf_event buf_done;
struct msm_isp32_error_info error_info;
} u;
};
#endif
#ifdef CONFIG_MSM_AVTIMER
struct avtimer_fptr_t {
int (*fptr_avtimer_open)(void);
int (*fptr_avtimer_enable)(int enable);
int (*fptr_avtimer_get_time)(uint64_t *avtimer_tick);
};
void msm_isp_set_avtimer_fptr(struct avtimer_fptr_t avtimer_func);
#endif
#endif

View file

@ -626,6 +626,11 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_SGBRG12 v4l2_fourcc('G', 'B', '1', '2') /* 12 GBGB.. RGRG.. */
#define V4L2_PIX_FMT_SGRBG12 v4l2_fourcc('B', 'A', '1', '2') /* 12 GRGR.. BGBG.. */
#define V4L2_PIX_FMT_SRGGB12 v4l2_fourcc('R', 'G', '1', '2') /* 12 RGRG.. GBGB.. */
#define V4L2_PIX_FMT_SBGGR10DPCM6 v4l2_fourcc('b', 'B', 'A', '6')
#define V4L2_PIX_FMT_SGBRG10DPCM6 v4l2_fourcc('b', 'G', 'A', '6')
#define V4L2_PIX_FMT_SGRBG10DPCM6 v4l2_fourcc('B', 'D', '1', '6')
#define V4L2_PIX_FMT_SRGGB10DPCM6 v4l2_fourcc('b', 'R', 'A', '6')
/* 12bit raw bayer packed, 6 bytes for every 4 pixels */
#define V4L2_PIX_FMT_SBGGR12P v4l2_fourcc('p', 'B', 'C', 'C')
#define V4L2_PIX_FMT_SGBRG12P v4l2_fourcc('p', 'G', 'C', 'C')
@ -641,6 +646,10 @@ struct v4l2_pix_format {
#define V4L2_PIX_FMT_SGRBG16 v4l2_fourcc('G', 'R', '1', '6') /* 16 GRGR.. BGBG.. */
#define V4L2_PIX_FMT_SRGGB16 v4l2_fourcc('R', 'G', '1', '6') /* 16 RGRG.. GBGB.. */
#define V4L2_PIX_FMT_SBGGRPLAIN16 v4l2_fourcc('B', 'G', '1', '6')
#define V4L2_PIX_FMT_SGBRGPLAIN16 v4l2_fourcc('G', 'B', '1', '6')
#define V4L2_PIX_FMT_SGRBGPLAIN16 v4l2_fourcc('G', 'R', '1', '6')
#define V4L2_PIX_FMT_SRGGBPLAIN16 v4l2_fourcc('R', 'G', '1', '6')
/* HSV formats */
#define V4L2_PIX_FMT_HSV24 v4l2_fourcc('H', 'S', 'V', '3')
#define V4L2_PIX_FMT_HSV32 v4l2_fourcc('H', 'S', 'V', '4')

View file

@ -0,0 +1,639 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_LINUX_MSM_CAM_SENSOR_H
#define __UAPI_LINUX_MSM_CAM_SENSOR_H
#include <linux/v4l2-mediabus.h>
#include <media/msm_camsensor_sdk.h>
#include <linux/types.h>
#include <linux/i2c.h>
#define I2C_SEQ_REG_SETTING_MAX 5
#define MSM_SENSOR_MCLK_8HZ 8000000
#define MSM_SENSOR_MCLK_16HZ 16000000
#define MSM_SENSOR_MCLK_24HZ 24000000
#define MAX_SENSOR_NAME 32
#define MAX_ACTUATOR_AF_TOTAL_STEPS 1024
#define MAX_OIS_MOD_NAME_SIZE 32
#define MAX_OIS_NAME_SIZE 32
#define MAX_OIS_REG_SETTINGS 800
#define MOVE_NEAR 0
#define MOVE_FAR 1
#define MSM_ACTUATOR_MOVE_SIGNED_FAR -1
#define MSM_ACTUATOR_MOVE_SIGNED_NEAR 1
#define MAX_ACTUATOR_REGION 5
#define MAX_EEPROM_NAME 32
#define MAX_AF_ITERATIONS 3
#define MAX_NUMBER_OF_STEPS 47
#define MAX_REGULATOR 5
/*msm_flash_query_data_t query types*/
#define FLASH_QUERY_CURRENT 1
#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */
#define MSM_V4L2_PIX_FMT_META10 v4l2_fourcc('M', 'E', '1', '0') /* META10 */
#define MSM_V4L2_PIX_FMT_META12 v4l2_fourcc('M', 'E', '1', '2') /* META12 */
#define MSM_V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4')
/* 14 BGBG.. GRGR.. */
#define MSM_V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4')
/* 14 GBGB.. RGRG.. */
#define MSM_V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4')
/* 14 GRGR.. BGBG.. */
#define MSM_V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4')
/* 14 RGRG.. GBGB.. */
enum flash_type {
LED_FLASH = 1,
STROBE_FLASH,
GPIO_FLASH
};
enum msm_sensor_resolution_t {
MSM_SENSOR_RES_FULL,
MSM_SENSOR_RES_QTR,
MSM_SENSOR_RES_2,
MSM_SENSOR_RES_3,
MSM_SENSOR_RES_4,
MSM_SENSOR_RES_5,
MSM_SENSOR_RES_6,
MSM_SENSOR_RES_7,
MSM_SENSOR_INVALID_RES,
};
enum msm_camera_stream_type_t {
MSM_CAMERA_STREAM_PREVIEW,
MSM_CAMERA_STREAM_SNAPSHOT,
MSM_CAMERA_STREAM_VIDEO,
MSM_CAMERA_STREAM_INVALID,
};
enum sensor_sub_module_t {
SUB_MODULE_SENSOR,
SUB_MODULE_CHROMATIX,
SUB_MODULE_ACTUATOR,
SUB_MODULE_EEPROM,
SUB_MODULE_LED_FLASH,
SUB_MODULE_STROBE_FLASH,
SUB_MODULE_CSID,
SUB_MODULE_CSID_3D,
SUB_MODULE_CSIPHY,
SUB_MODULE_CSIPHY_3D,
SUB_MODULE_OIS,
SUB_MODULE_EXT,
SUB_MODULE_IR_LED,
SUB_MODULE_IR_CUT,
SUB_MODULE_LASER_LED,
SUB_MODULE_MAX,
};
enum {
MSM_CAMERA_EFFECT_MODE_OFF,
MSM_CAMERA_EFFECT_MODE_MONO,
MSM_CAMERA_EFFECT_MODE_NEGATIVE,
MSM_CAMERA_EFFECT_MODE_SOLARIZE,
MSM_CAMERA_EFFECT_MODE_SEPIA,
MSM_CAMERA_EFFECT_MODE_POSTERIZE,
MSM_CAMERA_EFFECT_MODE_WHITEBOARD,
MSM_CAMERA_EFFECT_MODE_BLACKBOARD,
MSM_CAMERA_EFFECT_MODE_AQUA,
MSM_CAMERA_EFFECT_MODE_EMBOSS,
MSM_CAMERA_EFFECT_MODE_SKETCH,
MSM_CAMERA_EFFECT_MODE_NEON,
MSM_CAMERA_EFFECT_MODE_MAX
};
enum {
MSM_CAMERA_WB_MODE_AUTO,
MSM_CAMERA_WB_MODE_CUSTOM,
MSM_CAMERA_WB_MODE_INCANDESCENT,
MSM_CAMERA_WB_MODE_FLUORESCENT,
MSM_CAMERA_WB_MODE_WARM_FLUORESCENT,
MSM_CAMERA_WB_MODE_DAYLIGHT,
MSM_CAMERA_WB_MODE_CLOUDY_DAYLIGHT,
MSM_CAMERA_WB_MODE_TWILIGHT,
MSM_CAMERA_WB_MODE_SHADE,
MSM_CAMERA_WB_MODE_OFF,
MSM_CAMERA_WB_MODE_MAX
};
enum {
MSM_CAMERA_SCENE_MODE_OFF,
MSM_CAMERA_SCENE_MODE_AUTO,
MSM_CAMERA_SCENE_MODE_LANDSCAPE,
MSM_CAMERA_SCENE_MODE_SNOW,
MSM_CAMERA_SCENE_MODE_BEACH,
MSM_CAMERA_SCENE_MODE_SUNSET,
MSM_CAMERA_SCENE_MODE_NIGHT,
MSM_CAMERA_SCENE_MODE_PORTRAIT,
MSM_CAMERA_SCENE_MODE_BACKLIGHT,
MSM_CAMERA_SCENE_MODE_SPORTS,
MSM_CAMERA_SCENE_MODE_ANTISHAKE,
MSM_CAMERA_SCENE_MODE_FLOWERS,
MSM_CAMERA_SCENE_MODE_CANDLELIGHT,
MSM_CAMERA_SCENE_MODE_FIREWORKS,
MSM_CAMERA_SCENE_MODE_PARTY,
MSM_CAMERA_SCENE_MODE_NIGHT_PORTRAIT,
MSM_CAMERA_SCENE_MODE_THEATRE,
MSM_CAMERA_SCENE_MODE_ACTION,
MSM_CAMERA_SCENE_MODE_AR,
MSM_CAMERA_SCENE_MODE_FACE_PRIORITY,
MSM_CAMERA_SCENE_MODE_BARCODE,
MSM_CAMERA_SCENE_MODE_HDR,
MSM_CAMERA_SCENE_MODE_MAX
};
enum csid_cfg_type_t {
CSID_INIT,
CSID_CFG,
CSID_TESTMODE_CFG,
CSID_RELEASE,
CSID_SECCAM_TOPOLOGY,
CSID_SECCAM_RESET,
};
enum csiphy_cfg_type_t {
CSIPHY_INIT,
CSIPHY_CFG,
CSIPHY_RELEASE,
};
enum camera_vreg_type {
VREG_TYPE_DEFAULT,
VREG_TYPE_CUSTOM,
};
enum sensor_af_t {
SENSOR_AF_FOCUSSED,
SENSOR_AF_NOT_FOCUSSED,
};
enum cci_i2c_master_t {
MASTER_0,
MASTER_1,
MASTER_MAX,
};
struct msm_camera_i2c_array_write_config {
struct msm_camera_i2c_reg_setting conf_array;
uint16_t slave_addr;
};
struct msm_camera_i2c_read_config {
uint16_t slave_addr;
uint16_t reg_addr;
enum msm_camera_i2c_reg_addr_type addr_type;
enum msm_camera_i2c_data_type data_type;
uint16_t data;
};
struct msm_camera_csi2_params {
struct msm_camera_csid_params csid_params;
struct msm_camera_csiphy_params csiphy_params;
uint8_t csi_clk_scale_enable;
};
struct msm_camera_csi_lane_params {
uint16_t csi_lane_assign;
uint16_t csi_lane_mask;
};
struct csi_lane_params_t {
uint16_t csi_lane_assign;
uint8_t csi_lane_mask;
uint8_t csi_if;
int8_t csid_core[2];
uint8_t csi_phy_sel;
};
struct msm_sensor_info_t {
char sensor_name[MAX_SENSOR_NAME];
uint32_t session_id;
int32_t subdev_id[SUB_MODULE_MAX];
int32_t subdev_intf[SUB_MODULE_MAX];
uint8_t is_mount_angle_valid;
uint32_t sensor_mount_angle;
int modes_supported;
enum camb_position_t position;
};
struct camera_vreg_t {
const char *reg_name;
int min_voltage;
int max_voltage;
int op_mode;
uint32_t delay;
const char *custom_vreg_name;
enum camera_vreg_type type;
};
struct sensorb_cfg_data {
int cfgtype;
union {
struct msm_sensor_info_t sensor_info;
struct msm_sensor_init_params sensor_init_params;
void *setting;
struct msm_sensor_i2c_sync_params sensor_i2c_sync_params;
} cfg;
};
struct csid_cfg_data {
enum csid_cfg_type_t cfgtype;
union {
uint32_t csid_version;
struct msm_camera_csid_params *csid_params;
struct msm_camera_csid_testmode_parms *csid_testmode_params;
} cfg;
};
struct csiphy_cfg_data {
enum csiphy_cfg_type_t cfgtype;
union {
struct msm_camera_csiphy_params __user *csiphy_params;
struct msm_camera_csi_lane_params *csi_lane_params;
} cfg;
};
enum eeprom_cfg_type_t {
CFG_EEPROM_GET_INFO,
CFG_EEPROM_GET_CAL_DATA,
CFG_EEPROM_READ_CAL_DATA,
CFG_EEPROM_WRITE_DATA,
CFG_EEPROM_GET_MM_INFO,
CFG_EEPROM_INIT,
};
struct eeprom_get_t {
uint32_t num_bytes;
};
struct eeprom_read_t {
uint8_t *dbuffer;
uint32_t num_bytes;
};
struct eeprom_write_t {
uint8_t *dbuffer;
uint32_t num_bytes;
};
struct eeprom_get_cmm_t {
uint32_t cmm_support;
uint32_t cmm_compression;
uint32_t cmm_size;
};
struct msm_eeprom_info_t {
struct msm_sensor_power_setting_array *power_setting_array;
enum i2c_freq_mode_t i2c_freq_mode;
struct msm_eeprom_memory_map_array *mem_map_array;
};
struct msm_ir_led_cfg_data_t {
enum msm_ir_led_cfg_type_t cfg_type;
int32_t pwm_duty_on_ns;
int32_t pwm_period_ns;
};
struct msm_ir_cut_cfg_data_t {
enum msm_ir_cut_cfg_type_t cfg_type;
};
struct msm_laser_led_cfg_data_t {
enum msm_laser_led_cfg_type_t cfg_type;
void __user *setting;
void __user *debug_reg;
uint32_t debug_reg_size;
uint16_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
};
struct msm_eeprom_cfg_data {
enum eeprom_cfg_type_t cfgtype;
uint8_t is_supported;
union {
char eeprom_name[MAX_EEPROM_NAME];
struct eeprom_get_t get_data;
struct eeprom_read_t read_data;
struct eeprom_write_t write_data;
struct eeprom_get_cmm_t get_cmm_data;
struct msm_eeprom_info_t eeprom_info;
} cfg;
};
enum msm_sensor_cfg_type_t {
CFG_SET_SLAVE_INFO,
CFG_SLAVE_READ_I2C,
CFG_WRITE_I2C_ARRAY,
CFG_SLAVE_WRITE_I2C_ARRAY,
CFG_WRITE_I2C_SEQ_ARRAY,
CFG_POWER_UP,
CFG_POWER_DOWN,
CFG_SET_STOP_STREAM_SETTING,
CFG_GET_SENSOR_INFO,
CFG_GET_SENSOR_INIT_PARAMS,
CFG_SET_INIT_SETTING,
CFG_SET_RESOLUTION,
CFG_SET_STOP_STREAM,
CFG_SET_START_STREAM,
CFG_SET_SATURATION,
CFG_SET_CONTRAST,
CFG_SET_SHARPNESS,
CFG_SET_ISO,
CFG_SET_EXPOSURE_COMPENSATION,
CFG_SET_ANTIBANDING,
CFG_SET_BESTSHOT_MODE,
CFG_SET_EFFECT,
CFG_SET_WHITE_BALANCE,
CFG_SET_AUTOFOCUS,
CFG_CANCEL_AUTOFOCUS,
CFG_SET_STREAM_TYPE,
CFG_SET_I2C_SYNC_PARAM,
CFG_WRITE_I2C_ARRAY_ASYNC,
CFG_WRITE_I2C_ARRAY_SYNC,
CFG_WRITE_I2C_ARRAY_SYNC_BLOCK,
};
enum msm_actuator_cfg_type_t {
CFG_GET_ACTUATOR_INFO,
CFG_SET_ACTUATOR_INFO,
CFG_SET_DEFAULT_FOCUS,
CFG_MOVE_FOCUS,
CFG_SET_POSITION,
CFG_ACTUATOR_POWERDOWN,
CFG_ACTUATOR_POWERUP,
CFG_ACTUATOR_INIT,
};
struct msm_ois_opcode {
uint32_t prog;
uint32_t coeff;
uint32_t pheripheral;
uint32_t memory;
};
enum msm_ois_cfg_type_t {
CFG_OIS_INIT,
CFG_OIS_POWERDOWN,
CFG_OIS_POWERUP,
CFG_OIS_CONTROL,
CFG_OIS_I2C_WRITE_SEQ_TABLE,
};
enum msm_ois_cfg_download_type_t {
CFG_OIS_DOWNLOAD,
CFG_OIS_DATA_CONFIG,
};
enum msm_ois_i2c_operation {
MSM_OIS_WRITE = 0,
MSM_OIS_POLL,
MSM_OIS_READ,
};
#define MSM_OIS_READ MSM_OIS_READ
struct reg_settings_ois_t {
uint16_t reg_addr;
enum msm_camera_i2c_reg_addr_type addr_type;
uint32_t reg_data;
enum msm_camera_i2c_data_type data_type;
enum msm_ois_i2c_operation i2c_operation;
uint32_t delay;
};
struct msm_ois_params_t {
uint16_t data_size;
uint16_t setting_size;
uint32_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type i2c_addr_type;
enum msm_camera_i2c_data_type i2c_data_type;
struct reg_settings_ois_t __user *settings;
};
struct msm_ois_set_info_t {
struct msm_ois_params_t ois_params;
};
struct msm_actuator_move_params_t {
int8_t dir;
int8_t sign_dir;
int16_t dest_step_pos;
int32_t num_steps;
uint16_t curr_lens_pos;
struct damping_params_t __user *ringing_params;
};
struct msm_actuator_tuning_params_t {
int16_t initial_code;
uint16_t pwd_step;
uint16_t region_size;
uint32_t total_steps;
struct region_params_t __user *region_params;
};
struct park_lens_data_t {
uint32_t damping_step;
uint32_t damping_delay;
uint32_t hw_params;
uint32_t max_step;
};
struct msm_actuator_params_t {
enum actuator_type act_type;
uint8_t reg_tbl_size;
uint16_t data_size;
uint16_t init_setting_size;
uint32_t i2c_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type i2c_addr_type;
enum msm_camera_i2c_data_type i2c_data_type;
struct msm_actuator_reg_params_t __user *reg_tbl_params;
struct reg_settings_t __user *init_settings;
struct park_lens_data_t park_lens;
};
struct msm_actuator_set_info_t {
struct msm_actuator_params_t actuator_params;
struct msm_actuator_tuning_params_t af_tuning_params;
};
struct msm_actuator_get_info_t {
uint32_t focal_length_num;
uint32_t focal_length_den;
uint32_t f_number_num;
uint32_t f_number_den;
uint32_t f_pix_num;
uint32_t f_pix_den;
uint32_t total_f_dist_num;
uint32_t total_f_dist_den;
uint32_t hor_view_angle_num;
uint32_t hor_view_angle_den;
uint32_t ver_view_angle_num;
uint32_t ver_view_angle_den;
};
enum af_camera_name {
ACTUATOR_MAIN_CAM_0,
ACTUATOR_MAIN_CAM_1,
ACTUATOR_MAIN_CAM_2,
ACTUATOR_MAIN_CAM_3,
ACTUATOR_MAIN_CAM_4,
ACTUATOR_MAIN_CAM_5,
ACTUATOR_WEB_CAM_0,
ACTUATOR_WEB_CAM_1,
ACTUATOR_WEB_CAM_2,
};
struct msm_ois_slave_info {
char ois_name[MAX_OIS_NAME_SIZE];
uint32_t i2c_addr;
struct msm_ois_opcode opcode;
};
struct msm_ois_cfg_data {
int cfgtype;
union {
struct msm_ois_set_info_t set_info;
struct msm_camera_i2c_seq_reg_setting *settings;
} cfg;
};
struct msm_ois_cfg_download_data {
int cfgtype;
struct msm_ois_slave_info slave_info;
};
struct msm_actuator_set_position_t {
uint16_t number_of_steps;
uint32_t hw_params;
uint16_t pos[MAX_NUMBER_OF_STEPS];
uint16_t delay[MAX_NUMBER_OF_STEPS];
};
struct msm_actuator_cfg_data {
int cfgtype;
uint8_t is_af_supported;
union {
struct msm_actuator_move_params_t move;
struct msm_actuator_set_info_t set_info;
struct msm_actuator_get_info_t get_info;
struct msm_actuator_set_position_t setpos;
enum af_camera_name cam_name;
} cfg;
};
enum msm_camera_led_config_t {
MSM_CAMERA_LED_OFF,
MSM_CAMERA_LED_LOW,
MSM_CAMERA_LED_HIGH,
MSM_CAMERA_LED_INIT,
MSM_CAMERA_LED_RELEASE,
};
struct msm_camera_led_cfg_t {
enum msm_camera_led_config_t cfgtype;
int32_t torch_current[MAX_LED_TRIGGERS];
int32_t flash_current[MAX_LED_TRIGGERS];
int32_t flash_duration[MAX_LED_TRIGGERS];
};
struct msm_flash_init_info_t {
enum msm_flash_driver_type flash_driver_type;
uint32_t slave_addr;
enum i2c_freq_mode_t i2c_freq_mode;
struct msm_sensor_power_setting_array __user *power_setting_array;
struct msm_camera_i2c_reg_setting_array __user *settings;
};
struct msm_flash_cfg_data_t {
enum msm_flash_cfg_type_t cfg_type;
int32_t flash_current[MAX_LED_TRIGGERS];
int32_t flash_duration[MAX_LED_TRIGGERS];
union {
struct msm_flash_init_info_t *flash_init_info;
struct msm_camera_i2c_reg_setting_array __user *settings;
} cfg;
};
struct msm_flash_query_data_t {
int32_t flags;
int32_t query_type;
int32_t max_avail_curr;
};
/* sensor init structures and enums */
enum msm_sensor_init_cfg_type_t {
CFG_SINIT_PROBE,
CFG_SINIT_PROBE_DONE,
CFG_SINIT_PROBE_WAIT_DONE,
};
struct sensor_init_cfg_data {
enum msm_sensor_init_cfg_type_t cfgtype;
struct msm_sensor_info_t probed_info;
char entity_name[MAX_SENSOR_NAME];
union {
void *setting;
} cfg;
};
#define VIDIOC_MSM_SENSOR_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct sensorb_cfg_data)
#define VIDIOC_MSM_SENSOR_RELEASE \
_IO('V', BASE_VIDIOC_PRIVATE + 2)
#define VIDIOC_MSM_SENSOR_GET_SUBDEV_ID \
_IOWR('V', BASE_VIDIOC_PRIVATE + 3, uint32_t)
#define VIDIOC_MSM_CSIPHY_IO_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct csiphy_cfg_data)
#define VIDIOC_MSM_CSID_IO_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct csid_cfg_data)
#define VIDIOC_MSM_ACTUATOR_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_actuator_cfg_data)
#define VIDIOC_MSM_FLASH_LED_DATA_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_led_cfg_t)
#define VIDIOC_MSM_EEPROM_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_eeprom_cfg_data)
#define VIDIOC_MSM_SENSOR_GET_AF_STATUS \
_IOWR('V', BASE_VIDIOC_PRIVATE + 9, uint32_t)
#define VIDIOC_MSM_SENSOR_INIT_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct sensor_init_cfg_data)
#define VIDIOC_MSM_OIS_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_ois_cfg_data)
#define VIDIOC_MSM_FLASH_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_flash_cfg_data_t)
#define VIDIOC_MSM_OIS_CFG_DOWNLOAD \
_IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_ois_cfg_download_data)
#define VIDIOC_MSM_FLASH_QUERY_DATA \
_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_flash_query_data_t)
#define VIDIOC_MSM_IR_LED_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_led_cfg_data_t)
#define VIDIOC_MSM_IR_CUT_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_ir_cut_cfg_data_t)
#define VIDIOC_MSM_LASER_LED_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_laser_led_cfg_data_t)
#endif

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,443 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_LINUX_MSM_CAMSENSOR_SDK_H
#define __UAPI_LINUX_MSM_CAMSENSOR_SDK_H
#include <linux/videodev2.h>
#define KVERSION 0x1
#define MAX_POWER_CONFIG 12
#define GPIO_OUT_LOW (0 << 1)
#define GPIO_OUT_HIGH (1 << 1)
#define CSI_EMBED_DATA 0x12
#define CSI_RESERVED_DATA_0 0x13
#define CSI_YUV422_8 0x1E
#define CSI_RAW8 0x2A
#define CSI_RAW10 0x2B
#define CSI_RAW12 0x2C
#define CSI_DECODE_6BIT 0
#define CSI_DECODE_8BIT 1
#define CSI_DECODE_10BIT 2
#define CSI_DECODE_12BIT 3
#define CSI_DECODE_DPCM_10_6_10 4
#define CSI_DECODE_DPCM_10_8_10 5
#define MAX_CID 16
#define I2C_SEQ_REG_DATA_MAX 1024
#define I2C_REG_DATA_MAX (8*1024)
#define MSM_V4L2_PIX_FMT_META v4l2_fourcc('M', 'E', 'T', 'A') /* META */
#define MSM_V4L2_PIX_FMT_SBGGR14 v4l2_fourcc('B', 'G', '1', '4')
/* 14 BGBG.. GRGR.. */
#define MSM_V4L2_PIX_FMT_SGBRG14 v4l2_fourcc('G', 'B', '1', '4')
/* 14 GBGB.. RGRG.. */
#define MSM_V4L2_PIX_FMT_SGRBG14 v4l2_fourcc('B', 'A', '1', '4')
/* 14 GRGR.. BGBG.. */
#define MSM_V4L2_PIX_FMT_SRGGB14 v4l2_fourcc('R', 'G', '1', '4')
/* 14 RGRG.. GBGB.. */
#define MAX_ACTUATOR_REG_TBL_SIZE 8
#define MAX_ACTUATOR_REGION 5
#define NUM_ACTUATOR_DIR 2
#define MAX_ACTUATOR_SCENARIO 8
#define MAX_ACT_MOD_NAME_SIZE 32
#define MAX_ACT_NAME_SIZE 32
#define MAX_ACTUATOR_INIT_SET 120
#define MAX_I2C_REG_SET 12
#define MAX_LED_TRIGGERS 3
#define MSM_EEPROM_MEMORY_MAP_MAX_SIZE 80
#define MSM_EEPROM_MAX_MEM_MAP_CNT 8
#define MSM_SENSOR_BYPASS_VIDEO_NODE 1
#define SENSOR_PROBE_WRITE
#define SECURE_CAMERA
#define SECURE_CAM_RST_MODULES
enum msm_sensor_camera_id_t {
CAMERA_0,
CAMERA_1,
CAMERA_2,
CAMERA_3,
MAX_CAMERAS,
};
enum i2c_freq_mode_t {
I2C_STANDARD_MODE,
I2C_FAST_MODE,
I2C_CUSTOM_MODE,
I2C_FAST_PLUS_MODE,
I2C_MAX_MODES,
};
enum camb_position_t {
BACK_CAMERA_B,
FRONT_CAMERA_B,
AUX_CAMERA_B = 0x100,
INVALID_CAMERA_B,
};
enum msm_sensor_power_seq_type_t {
SENSOR_CLK,
SENSOR_GPIO,
SENSOR_VREG,
SENSOR_I2C_MUX,
SENSOR_I2C,
};
enum msm_camera_i2c_reg_addr_type {
MSM_CAMERA_I2C_BYTE_ADDR = 1,
MSM_CAMERA_I2C_WORD_ADDR,
MSM_CAMERA_I2C_3B_ADDR,
MSM_CAMERA_I2C_DWORD_ADDR,
MSM_CAMERA_I2C_ADDR_TYPE_MAX,
};
#define MSM_CAMERA_I2C_DWORD_ADDR MSM_CAMERA_I2C_DWORD_ADDR
enum msm_camera_i2c_data_type {
MSM_CAMERA_I2C_BYTE_DATA = 1,
MSM_CAMERA_I2C_WORD_DATA,
MSM_CAMERA_I2C_DWORD_DATA,
MSM_CAMERA_I2C_SET_BYTE_MASK,
MSM_CAMERA_I2C_UNSET_BYTE_MASK,
MSM_CAMERA_I2C_SET_WORD_MASK,
MSM_CAMERA_I2C_UNSET_WORD_MASK,
MSM_CAMERA_I2C_SET_BYTE_WRITE_MASK_DATA,
MSM_CAMERA_I2C_DATA_TYPE_MAX,
};
enum msm_sensor_power_seq_gpio_t {
SENSOR_GPIO_RESET,
SENSOR_GPIO_STANDBY,
SENSOR_GPIO_AF_PWDM,
SENSOR_GPIO_VIO,
SENSOR_GPIO_VANA,
SENSOR_GPIO_VDIG,
SENSOR_GPIO_VAF,
SENSOR_GPIO_FL_EN,
SENSOR_GPIO_FL_NOW,
SENSOR_GPIO_FL_RESET,
SENSOR_GPIO_CUSTOM1,
SENSOR_GPIO_CUSTOM2,
SENSOR_GPIO_CUSTOM3,
SENSOR_GPIO_MAX,
};
#define SENSOR_GPIO_CUSTOM3 SENSOR_GPIO_CUSTOM3
enum msm_ir_cut_filter_gpio_t {
IR_CUT_FILTER_GPIO_P = 0,
IR_CUT_FILTER_GPIO_M,
IR_CUT_FILTER_GPIO_MAX,
};
#define IR_CUT_FILTER_GPIO_P IR_CUT_FILTER_GPIO_P
#define IR_CUT_FILTER_GPIO_M IR_CUT_FILTER_GPIO_M
#define R_CUT_FILTER_GPIO_MAX IR_CUT_FILTER_GPIO_MAX
enum msm_camera_vreg_name_t {
CAM_VDIG,
CAM_VIO,
CAM_VANA,
CAM_VAF,
CAM_V_CUSTOM1,
CAM_V_CUSTOM2,
CAM_VREG_MAX,
};
enum msm_sensor_clk_type_t {
SENSOR_CAM_MCLK,
SENSOR_CAM_CLK,
SENSOR_CAM_CLK_MAX,
};
enum camerab_mode_t {
CAMERA_MODE_2D_B = (1<<0),
CAMERA_MODE_3D_B = (1<<1),
CAMERA_MODE_INVALID = (1<<2),
};
enum msm_actuator_data_type {
MSM_ACTUATOR_BYTE_DATA = 1,
MSM_ACTUATOR_WORD_DATA,
};
enum msm_actuator_addr_type {
MSM_ACTUATOR_BYTE_ADDR = 1,
MSM_ACTUATOR_WORD_ADDR,
};
enum msm_actuator_write_type {
MSM_ACTUATOR_WRITE_HW_DAMP,
MSM_ACTUATOR_WRITE_DAC,
MSM_ACTUATOR_WRITE,
MSM_ACTUATOR_WRITE_DIR_REG,
MSM_ACTUATOR_POLL,
MSM_ACTUATOR_READ_WRITE,
};
enum msm_actuator_i2c_operation {
MSM_ACT_WRITE = 0,
MSM_ACT_POLL,
};
enum actuator_type {
ACTUATOR_VCM,
ACTUATOR_PIEZO,
ACTUATOR_HVCM,
ACTUATOR_BIVCM,
};
enum msm_flash_driver_type {
FLASH_DRIVER_PMIC,
FLASH_DRIVER_I2C,
FLASH_DRIVER_GPIO,
FLASH_DRIVER_DEFAULT
};
enum msm_flash_cfg_type_t {
CFG_FLASH_INIT,
CFG_FLASH_RELEASE,
CFG_FLASH_OFF,
CFG_FLASH_LOW,
CFG_FLASH_HIGH,
};
enum msm_ir_led_cfg_type_t {
CFG_IR_LED_INIT = 0,
CFG_IR_LED_RELEASE,
CFG_IR_LED_OFF,
CFG_IR_LED_ON,
};
#define CFG_IR_LED_INIT CFG_IR_LED_INIT
#define CFG_IR_LED_RELEASE CFG_IR_LED_RELEASE
#define CFG_IR_LED_OFF CFG_IR_LED_OFF
#define CFG_IR_LED_ON CFG_IR_LED_ON
enum msm_laser_led_cfg_type_t {
CFG_LASER_LED_INIT,
CFG_LASER_LED_CONTROL,
};
#define CFG_LASER_LED_INIT CFG_LASER_LED_INIT
#define CFG_LASER_LED_CONTROL CFG_LASER_LED_CONTROL
enum msm_ir_cut_cfg_type_t {
CFG_IR_CUT_INIT = 0,
CFG_IR_CUT_RELEASE,
CFG_IR_CUT_OFF,
CFG_IR_CUT_ON,
};
#define CFG_IR_CUT_INIT CFG_IR_CUT_INIT
#define CFG_IR_CUT_RELEASE CFG_IR_CUT_RELEASE
#define CFG_IR_CUT_OFF CFG_IR_CUT_OFF
#define CFG_IR_CUT_ON CFG_IR_CUT_ON
enum msm_sensor_output_format_t {
MSM_SENSOR_BAYER,
MSM_SENSOR_YCBCR,
MSM_SENSOR_META,
};
struct msm_sensor_power_setting {
enum msm_sensor_power_seq_type_t seq_type;
unsigned short seq_val;
long config_val;
unsigned short delay;
void *data[10];
};
struct msm_sensor_power_setting_array {
struct msm_sensor_power_setting power_setting_a[MAX_POWER_CONFIG];
struct msm_sensor_power_setting *power_setting;
unsigned short size;
struct msm_sensor_power_setting power_down_setting_a[MAX_POWER_CONFIG];
struct msm_sensor_power_setting *power_down_setting;
unsigned short size_down;
};
enum msm_camera_i2c_operation {
MSM_CAM_WRITE = 0,
MSM_CAM_POLL,
MSM_CAM_READ,
};
struct msm_sensor_i2c_sync_params {
unsigned int cid;
int csid;
unsigned short line;
unsigned short delay;
};
struct msm_camera_reg_settings_t {
uint16_t reg_addr;
enum msm_camera_i2c_reg_addr_type addr_type;
uint16_t reg_data;
enum msm_camera_i2c_data_type data_type;
enum msm_camera_i2c_operation i2c_operation;
uint16_t delay;
};
struct msm_eeprom_mem_map_t {
int slave_addr;
struct msm_camera_reg_settings_t
mem_settings[MSM_EEPROM_MEMORY_MAP_MAX_SIZE];
int memory_map_size;
};
struct msm_eeprom_memory_map_array {
struct msm_eeprom_mem_map_t memory_map[MSM_EEPROM_MAX_MEM_MAP_CNT];
uint32_t msm_size_of_max_mappings;
};
struct msm_sensor_init_params {
/* mask of modes supported: 2D, 3D */
int modes_supported;
/* sensor position: front, back */
enum camb_position_t position;
/* sensor mount angle */
unsigned int sensor_mount_angle;
};
struct msm_camera_i2c_reg_setting {
struct msm_camera_i2c_reg_array *reg_setting;
unsigned short size;
enum msm_camera_i2c_reg_addr_type addr_type;
enum msm_camera_i2c_data_type data_type;
unsigned short delay;
};
struct msm_sensor_id_info_t {
unsigned short sensor_id_reg_addr;
unsigned short sensor_id;
unsigned short sensor_id_mask;
struct msm_camera_i2c_reg_setting setting;
};
struct msm_camera_sensor_slave_info {
char sensor_name[32];
char eeprom_name[32];
char actuator_name[32];
char ois_name[32];
char flash_name[32];
enum msm_sensor_camera_id_t camera_id;
unsigned short slave_addr;
enum i2c_freq_mode_t i2c_freq_mode;
enum msm_camera_i2c_reg_addr_type addr_type;
struct msm_sensor_id_info_t sensor_id_info;
struct msm_sensor_power_setting_array power_setting_array;
unsigned char is_init_params_valid;
struct msm_sensor_init_params sensor_init_params;
enum msm_sensor_output_format_t output_format;
uint8_t bypass_video_node_creation;
};
struct msm_camera_i2c_reg_array {
unsigned short reg_addr;
unsigned short reg_data;
unsigned int delay;
};
struct msm_camera_csid_vc_cfg {
unsigned char cid;
unsigned char dt;
unsigned char decode_format;
};
struct msm_camera_csid_lut_params {
unsigned char num_cid;
struct msm_camera_csid_vc_cfg vc_cfg_a[MAX_CID];
struct msm_camera_csid_vc_cfg *vc_cfg[MAX_CID];
};
struct msm_camera_csid_params {
unsigned char lane_cnt;
unsigned short lane_assign;
unsigned char phy_sel;
unsigned int csi_clk;
struct msm_camera_csid_lut_params lut_params;
unsigned char csi_3p_sel;
unsigned char is_secure;
uint32_t topology;
unsigned char is_streamon;
};
struct msm_camera_csid_testmode_parms {
unsigned int num_bytes_per_line;
unsigned int num_lines;
unsigned int h_blanking_count;
unsigned int v_blanking_count;
unsigned int payload_mode;
};
struct msm_camera_csiphy_params {
unsigned char lane_cnt;
unsigned char settle_cnt;
unsigned short lane_mask;
unsigned char combo_mode;
unsigned char csid_core;
unsigned int csiphy_clk;
unsigned char csi_3phase;
uint64_t data_rate;
};
struct msm_camera_i2c_seq_reg_array {
unsigned short reg_addr;
unsigned char reg_data[I2C_SEQ_REG_DATA_MAX];
unsigned short reg_data_size;
};
struct msm_camera_i2c_seq_reg_setting {
struct msm_camera_i2c_seq_reg_array *reg_setting;
unsigned short size;
enum msm_camera_i2c_reg_addr_type addr_type;
unsigned short delay;
};
struct msm_actuator_reg_params_t {
enum msm_actuator_write_type reg_write_type;
unsigned int hw_mask;
unsigned short reg_addr;
unsigned short hw_shift;
unsigned short data_shift;
unsigned short data_type;
unsigned short addr_type;
unsigned short reg_data;
unsigned short delay;
};
struct damping_params_t {
unsigned int damping_step;
unsigned int damping_delay;
unsigned int hw_params;
};
struct region_params_t {
/* [0] = ForwardDirection Macro boundary
* [1] = ReverseDirection Inf boundary
*/
unsigned short step_bound[2];
unsigned short code_per_step;
/* qvalue for converting float type numbers to integer format */
unsigned int qvalue;
};
struct reg_settings_t {
unsigned short reg_addr;
enum msm_camera_i2c_reg_addr_type addr_type;
unsigned short reg_data;
enum msm_camera_i2c_data_type data_type;
enum msm_actuator_i2c_operation i2c_operation;
unsigned int delay;
};
struct msm_camera_i2c_reg_setting_array {
struct msm_camera_i2c_reg_array reg_setting_a[MAX_I2C_REG_SET];
unsigned short size;
enum msm_camera_i2c_reg_addr_type addr_type;
enum msm_camera_i2c_data_type data_type;
unsigned short delay;
};
#endif

View file

@ -0,0 +1,76 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_MSM_FD__
#define __UAPI_MSM_FD__
#include <linux/videodev2.h>
#include <linux/types.h>
/*
* struct msm_fd_event - Structure contain event info.
* @buf_index: Buffer index.
* @frame_id: Frame id.
* @face_cnt: Detected faces.
*/
struct msm_fd_event {
__u32 buf_index;
__u32 frame_id;
__u32 face_cnt;
};
/*
* enum msm_fd_pose - Face pose.
*/
enum msm_fd_pose {
MSM_FD_POSE_FRONT,
MSM_FD_POSE_RIGHT_DIAGONAL,
MSM_FD_POSE_RIGHT,
MSM_FD_POSE_LEFT_DIAGONAL,
MSM_FD_POSE_LEFT,
};
/*
* struct msm_fd_face_data - Structure contain detected face data.
* @pose: refer to enum msm_fd_pose.
* @angle: Face angle
* @confidence: Face confidence level.
* @reserved: Reserved data for future use.
* @face: Face rectangle.
*/
struct msm_fd_face_data {
__u32 pose;
__u32 angle;
__u32 confidence;
__u32 reserved;
struct v4l2_rect face;
};
/*
* struct msm_fd_result - Structure contain detected faces result.
* @frame_id: Frame id of requested result.
* @face_cnt: Number of result faces, driver can modify this value (to smaller)
* @face_data: Pointer to array of face data structures.
* Array size should not be smaller then face_cnt.
*/
struct msm_fd_result {
__u32 frame_id;
__u32 face_cnt;
struct msm_fd_face_data __user *face_data;
};
/* MSM FD private ioctl ID */
#define VIDIOC_MSM_FD_GET_RESULT \
_IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_fd_result)
/* MSM FD event ID */
#define MSM_EVENT_FD (V4L2_EVENT_PRIVATE_START)
/* MSM FD control ID's */
#define V4L2_CID_FD_SPEED (V4L2_CID_PRIVATE_BASE)
#define V4L2_CID_FD_FACE_ANGLE (V4L2_CID_PRIVATE_BASE + 1)
#define V4L2_CID_FD_MIN_FACE_SIZE (V4L2_CID_PRIVATE_BASE + 2)
#define V4L2_CID_FD_FACE_DIRECTION (V4L2_CID_PRIVATE_BASE + 3)
#define V4L2_CID_FD_DETECTION_THRESHOLD (V4L2_CID_PRIVATE_BASE + 4)
#define V4L2_CID_FD_WORK_MEMORY_SIZE (V4L2_CID_PRIVATE_BASE + 5)
#define V4L2_CID_FD_WORK_MEMORY_FD (V4L2_CID_PRIVATE_BASE + 6)
#endif

View file

@ -0,0 +1,125 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_LINUX_MSM_JPEG_H
#define __UAPI_LINUX_MSM_JPEG_H
#include <linux/types.h>
#include <linux/ioctl.h>
#define OUTPUT_H2V1 0
#define OUTPUT_H2V2 1
#define OUTPUT_BYTE 6
#define MSM_JPEG_IOCTL_MAGIC 'g'
#define MSM_JPEG_IOCTL_GET_HW_VERSION \
_IOW(MSM_JPEG_IOCTL_MAGIC, 1, struct msm_jpeg_hw_cmd)
#define MSM_JPEG_IOCTL_RESET \
_IOW(MSM_JPEG_IOCTL_MAGIC, 2, struct msm_jpeg_ctrl_cmd)
#define MSM_JPEG_IOCTL_STOP \
_IOW(MSM_JPEG_IOCTL_MAGIC, 3, struct msm_jpeg_hw_cmds)
#define MSM_JPEG_IOCTL_START \
_IOW(MSM_JPEG_IOCTL_MAGIC, 4, struct msm_jpeg_hw_cmds)
#define MSM_JPEG_IOCTL_INPUT_BUF_ENQUEUE \
_IOW(MSM_JPEG_IOCTL_MAGIC, 5, struct msm_jpeg_buf)
#define MSM_JPEG_IOCTL_INPUT_GET \
_IOW(MSM_JPEG_IOCTL_MAGIC, 6, struct msm_jpeg_buf)
#define MSM_JPEG_IOCTL_INPUT_GET_UNBLOCK \
_IOW(MSM_JPEG_IOCTL_MAGIC, 7, int)
#define MSM_JPEG_IOCTL_OUTPUT_BUF_ENQUEUE \
_IOW(MSM_JPEG_IOCTL_MAGIC, 8, struct msm_jpeg_buf)
#define MSM_JPEG_IOCTL_OUTPUT_GET \
_IOW(MSM_JPEG_IOCTL_MAGIC, 9, struct msm_jpeg_buf)
#define MSM_JPEG_IOCTL_OUTPUT_GET_UNBLOCK \
_IOW(MSM_JPEG_IOCTL_MAGIC, 10, int)
#define MSM_JPEG_IOCTL_EVT_GET \
_IOW(MSM_JPEG_IOCTL_MAGIC, 11, struct msm_jpeg_ctrl_cmd)
#define MSM_JPEG_IOCTL_EVT_GET_UNBLOCK \
_IOW(MSM_JPEG_IOCTL_MAGIC, 12, int)
#define MSM_JPEG_IOCTL_HW_CMD \
_IOW(MSM_JPEG_IOCTL_MAGIC, 13, struct msm_jpeg_hw_cmd)
#define MSM_JPEG_IOCTL_HW_CMDS \
_IOW(MSM_JPEG_IOCTL_MAGIC, 14, struct msm_jpeg_hw_cmds)
#define MSM_JPEG_IOCTL_TEST_DUMP_REGION \
_IOW(MSM_JPEG_IOCTL_MAGIC, 15, unsigned long)
#define MSM_JPEG_IOCTL_SET_CLK_RATE \
_IOW(MSM_JPEG_IOCTL_MAGIC, 16, unsigned int)
#define MSM_JPEG_MODE_REALTIME_ENCODE 0
#define MSM_JPEG_MODE_OFFLINE_ENCODE 1
#define MSM_JPEG_MODE_REALTIME_ROTATION 2
#define MSM_JPEG_MODE_OFFLINE_ROTATION 3
struct msm_jpeg_ctrl_cmd {
uint32_t type;
uint32_t len;
void *value;
};
#define MSM_JPEG_EVT_RESET 0
#define MSM_JPEG_EVT_SESSION_DONE 1
#define MSM_JPEG_EVT_ERR 2
struct msm_jpeg_buf {
uint32_t type;
int fd;
void *vaddr;
uint32_t y_off;
uint32_t y_len;
uint32_t framedone_len;
uint32_t cbcr_off;
uint32_t cbcr_len;
uint32_t num_of_mcu_rows;
uint32_t offset;
uint32_t pln2_off;
uint32_t pln2_len;
};
#define MSM_JPEG_HW_CMD_TYPE_READ 0
#define MSM_JPEG_HW_CMD_TYPE_WRITE 1
#define MSM_JPEG_HW_CMD_TYPE_WRITE_OR 2
#define MSM_JPEG_HW_CMD_TYPE_UWAIT 3
#define MSM_JPEG_HW_CMD_TYPE_MWAIT 4
#define MSM_JPEG_HW_CMD_TYPE_MDELAY 5
#define MSM_JPEG_HW_CMD_TYPE_UDELAY 6
struct msm_jpeg_hw_cmd {
uint32_t type:4;
/* n microseconds of timeout for WAIT */
/* n microseconds of time for DELAY */
/* repeat n times for READ/WRITE */
/* max is 0xFFF, 4095 */
uint32_t n:12;
uint32_t offset:16;
uint32_t mask;
union {
uint32_t data; /* for single READ/WRITE/WAIT, n = 1 */
uint32_t *pdata; /* for multiple READ/WRITE/WAIT, n > 1 */
};
};
struct msm_jpeg_hw_cmds {
uint32_t m; /* number of elements in the hw_cmd array */
struct msm_jpeg_hw_cmd hw_cmd[1];
};
#endif

View file

@ -0,0 +1,17 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_MSM_JPEG_DMA__
#define __UAPI_MSM_JPEG_DMA__
#include <linux/videodev2.h>
/* msm jpeg dma control ID's */
#define V4L2_CID_JPEG_DMA_SPEED (V4L2_CID_PRIVATE_BASE)
#define V4L2_CID_JPEG_DMA_MAX_DOWN_SCALE (V4L2_CID_PRIVATE_BASE + 1)
/* msm_jpeg_dma_buf */
struct msm_jpeg_dma_buff {
int32_t fd;
uint32_t offset;
};
#endif /* __UAPI_MSM_JPEG_DMA__ */

View file

@ -0,0 +1,234 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_LINUX_MSMB_CAMERA_H
#define __UAPI_LINUX_MSMB_CAMERA_H
#include <linux/videodev2.h>
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/media.h>
#define MSM_CAM_LOGSYNC_FILE_NAME "logsync"
#define MSM_CAM_LOGSYNC_FILE_BASEDIR "camera"
#define MSM_CAM_V4L2_IOCTL_NOTIFY \
_IOW('V', BASE_VIDIOC_PRIVATE + 30, struct msm_v4l2_event_data)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_META \
_IOW('V', BASE_VIDIOC_PRIVATE + 31, struct msm_v4l2_event_data)
#define MSM_CAM_V4L2_IOCTL_CMD_ACK \
_IOW('V', BASE_VIDIOC_PRIVATE + 32, struct msm_v4l2_event_data)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_ERROR \
_IOW('V', BASE_VIDIOC_PRIVATE + 33, struct msm_v4l2_event_data)
#define MSM_CAM_V4L2_IOCTL_NOTIFY_DEBUG \
_IOW('V', BASE_VIDIOC_PRIVATE + 34, struct msm_v4l2_event_data)
#define MSM_CAM_V4L2_IOCTL_DAEMON_DISABLED \
_IOW('V', BASE_VIDIOC_PRIVATE + 35, struct msm_v4l2_event_data)
#define QCAMERA_VNODE_GROUP_ID MEDIA_ENT_F_IO_V4L
#define MSM_CAMERA_NAME "msm_camera"
#define MSM_CONFIGURATION_NAME "msm_config"
//#define MSM_CAMERA_SUBDEV_BASE (MEDIA_ENT_F_OLD_SUBDEV_BASE + 1)
#define MSM_CAMERA_SUBDEV_BASE (MEDIA_ENT_F_OLD_BASE + 0xF00)
#define MSM_CAMERA_SUBDEV_CSIPHY (MSM_CAMERA_SUBDEV_BASE + 0)
//#define MSM_CAMERA_SUBDEV_CSID (MSM_CAMERA_SUBDEV_BASE + 1)
#define MSM_CAMERA_SUBDEV_CSID (MSM_CAMERA_SUBDEV_BASE + 13)
#define MSM_CAMERA_SUBDEV_ISPIF (MSM_CAMERA_SUBDEV_BASE + 2)
#define MSM_CAMERA_SUBDEV_VFE (MSM_CAMERA_SUBDEV_BASE + 3)
#define MSM_CAMERA_SUBDEV_AXI (MSM_CAMERA_SUBDEV_BASE + 4)
#define MSM_CAMERA_SUBDEV_VPE (MSM_CAMERA_SUBDEV_BASE + 5)
#define MSM_CAMERA_SUBDEV_SENSOR (MSM_CAMERA_SUBDEV_BASE + 6)
#define MSM_CAMERA_SUBDEV_ACTUATOR (MSM_CAMERA_SUBDEV_BASE + 7)
#define MSM_CAMERA_SUBDEV_EEPROM (MSM_CAMERA_SUBDEV_BASE + 8)
#define MSM_CAMERA_SUBDEV_CPP (MSM_CAMERA_SUBDEV_BASE + 9)
#define MSM_CAMERA_SUBDEV_CCI (MSM_CAMERA_SUBDEV_BASE + 10)
#define MSM_CAMERA_SUBDEV_LED_FLASH (MSM_CAMERA_SUBDEV_BASE + 11)
#define MSM_CAMERA_SUBDEV_STROBE_FLASH (MSM_CAMERA_SUBDEV_BASE + 12)
#define MSM_CAMERA_SUBDEV_BUF_MNGR (MSM_CAMERA_SUBDEV_BASE + 1)
//#define MSM_CAMERA_SUBDEV_BUF_MNGR (MSM_CAMERA_SUBDEV_BASE + 13)
#define MSM_CAMERA_SUBDEV_SENSOR_INIT (MSM_CAMERA_SUBDEV_BASE + 14)
#define MSM_CAMERA_SUBDEV_OIS (MSM_CAMERA_SUBDEV_BASE + 15)
#define MSM_CAMERA_SUBDEV_FLASH (MSM_CAMERA_SUBDEV_BASE + 16)
#define MSM_CAMERA_SUBDEV_IR_LED (MSM_CAMERA_SUBDEV_BASE + 17)
#define MSM_CAMERA_SUBDEV_IR_CUT (MSM_CAMERA_SUBDEV_BASE + 18)
#define MSM_CAMERA_SUBDEV_EXT (MSM_CAMERA_SUBDEV_BASE + 19)
#define MSM_CAMERA_SUBDEV_TOF (MSM_CAMERA_SUBDEV_BASE + 20)
#define MSM_CAMERA_SUBDEV_LASER_LED (MSM_CAMERA_SUBDEV_BASE + 21)
#define MSM_MAX_CAMERA_SENSORS 5
/* The below macro is defined to put an upper limit on maximum
* number of buffer requested per stream. In case of extremely
* large value for number of buffer due to data structure corruption
* we return error to avoid integer overflow. Group processing
* can have max of 9 groups of 8 bufs each. This value may be
* configured in future
*/
#define MSM_CAMERA_MAX_STREAM_BUF 72
/* Max batch size of processing */
#define MSM_CAMERA_MAX_USER_BUFF_CNT 16
/* featur base */
#define MSM_CAMERA_FEATURE_BASE 0x00010000
#define MSM_CAMERA_FEATURE_SHUTDOWN (MSM_CAMERA_FEATURE_BASE + 1)
#define MSM_CAMERA_STATUS_BASE 0x00020000
#define MSM_CAMERA_STATUS_FAIL (MSM_CAMERA_STATUS_BASE + 1)
#define MSM_CAMERA_STATUS_SUCCESS (MSM_CAMERA_STATUS_BASE + 2)
/* event type */
#define MSM_CAMERA_V4L2_EVENT_TYPE (V4L2_EVENT_PRIVATE_START + 0x00002000)
/* event id */
#define MSM_CAMERA_EVENT_MIN 0
#define MSM_CAMERA_NEW_SESSION (MSM_CAMERA_EVENT_MIN + 1)
#define MSM_CAMERA_DEL_SESSION (MSM_CAMERA_EVENT_MIN + 2)
#define MSM_CAMERA_SET_PARM (MSM_CAMERA_EVENT_MIN + 3)
#define MSM_CAMERA_GET_PARM (MSM_CAMERA_EVENT_MIN + 4)
#define MSM_CAMERA_MAPPING_CFG (MSM_CAMERA_EVENT_MIN + 5)
#define MSM_CAMERA_MAPPING_SES (MSM_CAMERA_EVENT_MIN + 6)
#define MSM_CAMERA_MSM_NOTIFY (MSM_CAMERA_EVENT_MIN + 7)
#define MSM_CAMERA_EVENT_MAX (MSM_CAMERA_EVENT_MIN + 8)
/* data.command */
#define MSM_CAMERA_PRIV_S_CROP (V4L2_CID_PRIVATE_BASE + 1)
#define MSM_CAMERA_PRIV_G_CROP (V4L2_CID_PRIVATE_BASE + 2)
#define MSM_CAMERA_PRIV_G_FMT (V4L2_CID_PRIVATE_BASE + 3)
#define MSM_CAMERA_PRIV_S_FMT (V4L2_CID_PRIVATE_BASE + 4)
#define MSM_CAMERA_PRIV_TRY_FMT (V4L2_CID_PRIVATE_BASE + 5)
#define MSM_CAMERA_PRIV_METADATA (V4L2_CID_PRIVATE_BASE + 6)
#define MSM_CAMERA_PRIV_QUERY_CAP (V4L2_CID_PRIVATE_BASE + 7)
#define MSM_CAMERA_PRIV_STREAM_ON (V4L2_CID_PRIVATE_BASE + 8)
#define MSM_CAMERA_PRIV_STREAM_OFF (V4L2_CID_PRIVATE_BASE + 9)
#define MSM_CAMERA_PRIV_NEW_STREAM (V4L2_CID_PRIVATE_BASE + 10)
#define MSM_CAMERA_PRIV_DEL_STREAM (V4L2_CID_PRIVATE_BASE + 11)
#define MSM_CAMERA_PRIV_SHUTDOWN (V4L2_CID_PRIVATE_BASE + 12)
#define MSM_CAMERA_PRIV_STREAM_INFO_SYNC \
(V4L2_CID_PRIVATE_BASE + 13)
#define MSM_CAMERA_PRIV_G_SESSION_ID (V4L2_CID_PRIVATE_BASE + 14)
#define MSM_CAMERA_PRIV_CMD_MAX 20
/* data.status - success */
#define MSM_CAMERA_CMD_SUCCESS 0x00000001
#define MSM_CAMERA_BUF_MAP_SUCCESS 0x00000002
/* data.status - error */
#define MSM_CAMERA_ERR_EVT_BASE 0x00010000
#define MSM_CAMERA_ERR_CMD_FAIL (MSM_CAMERA_ERR_EVT_BASE + 1)
#define MSM_CAMERA_ERR_MAPPING (MSM_CAMERA_ERR_EVT_BASE + 2)
#define MSM_CAMERA_ERR_DEVICE_BUSY (MSM_CAMERA_ERR_EVT_BASE + 3)
/* The msm_v4l2_event_data structure should match the
* v4l2_event.u.data field.
* should not exceed 16 elements
*/
struct msm_v4l2_event_data {
/*word 0*/
unsigned int command;
/*word 1*/
unsigned int status;
/*word 2*/
unsigned int session_id;
/*word 3*/
unsigned int stream_id;
/*word 4*/
unsigned int map_op;
/*word 5*/
unsigned int map_buf_idx;
/*word 6*/
unsigned int notify;
/*word 7*/
unsigned int arg_value;
/*word 8*/
unsigned int ret_value;
/*word 9*/
unsigned int v4l2_event_type;
/*word 10*/
unsigned int v4l2_event_id;
/*word 11*/
unsigned int handle;
/*word 12*/
unsigned int nop6;
/*word 13*/
unsigned int nop7;
/*word 14*/
unsigned int nop8;
/*word 15*/
unsigned int nop9;
};
/* map to v4l2_format.fmt.raw_data */
struct msm_v4l2_format_data {
enum v4l2_buf_type type;
unsigned int width;
unsigned int height;
unsigned int pixelformat; /* FOURCC */
unsigned char num_planes;
unsigned int plane_sizes[VIDEO_MAX_PLANES];
};
/* MSM Four-character-code (FOURCC) */
#define msm_v4l2_fourcc(a, b, c, d)\
((__u32)(a) | ((__u32)(b) << 8) | ((__u32)(c) << 16) |\
((__u32)(d) << 24))
/* Composite stats */
#define MSM_V4L2_PIX_FMT_STATS_COMB v4l2_fourcc('S', 'T', 'C', 'M')
/* AEC stats */
#define MSM_V4L2_PIX_FMT_STATS_AE v4l2_fourcc('S', 'T', 'A', 'E')
/* AF stats */
#define MSM_V4L2_PIX_FMT_STATS_AF v4l2_fourcc('S', 'T', 'A', 'F')
/* AWB stats */
#define MSM_V4L2_PIX_FMT_STATS_AWB v4l2_fourcc('S', 'T', 'W', 'B')
/* IHIST stats */
#define MSM_V4L2_PIX_FMT_STATS_IHST v4l2_fourcc('I', 'H', 'S', 'T')
/* Column count stats */
#define MSM_V4L2_PIX_FMT_STATS_CS v4l2_fourcc('S', 'T', 'C', 'S')
/* Row count stats */
#define MSM_V4L2_PIX_FMT_STATS_RS v4l2_fourcc('S', 'T', 'R', 'S')
/* Bayer Grid stats */
#define MSM_V4L2_PIX_FMT_STATS_BG v4l2_fourcc('S', 'T', 'B', 'G')
/* Bayer focus stats */
#define MSM_V4L2_PIX_FMT_STATS_BF v4l2_fourcc('S', 'T', 'B', 'F')
/* Bayer hist stats */
#define MSM_V4L2_PIX_FMT_STATS_BHST v4l2_fourcc('B', 'H', 'S', 'T')
enum smmu_attach_mode {
NON_SECURE_MODE = 0x01,
SECURE_MODE = 0x02,
MAX_PROTECTION_MODE = 0x03,
};
struct msm_camera_smmu_attach_type {
enum smmu_attach_mode attach;
};
struct msm_camera_user_buf_cont_t {
unsigned int buf_cnt;
unsigned int buf_idx[MSM_CAMERA_MAX_USER_BUFF_CNT];
};
struct msm_camera_return_buf {
__u32 index;
__u32 reserved;
};
#define MSM_CAMERA_PRIV_IOCTL_ID_BASE 0
#define MSM_CAMERA_PRIV_IOCTL_ID_RETURN_BUF 1
struct msm_camera_private_ioctl_arg {
__u32 id;
__u32 size;
__u32 result;
__u32 reserved;
__u64 ioctl_ptr;
};
#define VIDIOC_MSM_CAMERA_PRIVATE_IOCTL_CMD \
_IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_private_ioctl_arg)
#endif

View file

@ -0,0 +1,68 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_MEDIA_MSMB_GENERIC_BUF_MGR_H__
#define __UAPI_MEDIA_MSMB_GENERIC_BUF_MGR_H__
#include <media/msmb_camera.h>
enum msm_camera_buf_mngr_cmd {
MSM_CAMERA_BUF_MNGR_CONT_MAP,
MSM_CAMERA_BUF_MNGR_CONT_UNMAP,
MSM_CAMERA_BUF_MNGR_CONT_MAX,
};
enum msm_camera_buf_mngr_buf_type {
MSM_CAMERA_BUF_MNGR_BUF_PLANAR,
MSM_CAMERA_BUF_MNGR_BUF_USER,
MSM_CAMERA_BUF_MNGR_BUF_INVALID,
};
struct msm_buf_mngr_info {
uint32_t session_id;
uint32_t stream_id;
uint32_t frame_id;
struct timeval timestamp;
uint32_t index;
uint32_t reserved;
enum msm_camera_buf_mngr_buf_type type;
struct msm_camera_user_buf_cont_t user_buf;
};
struct msm_buf_mngr_main_cont_info {
uint32_t session_id;
uint32_t stream_id;
enum msm_camera_buf_mngr_cmd cmd;
uint32_t cnt;
int32_t cont_fd;
};
#define MSM_CAMERA_BUF_MNGR_IOCTL_ID_BASE 0
#define MSM_CAMERA_BUF_MNGR_IOCTL_ID_GET_BUF_BY_IDX 1
#define VIDIOC_MSM_BUF_MNGR_GET_BUF \
_IOWR('V', BASE_VIDIOC_PRIVATE + 33, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_PUT_BUF \
_IOWR('V', BASE_VIDIOC_PRIVATE + 34, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_BUF_DONE \
_IOWR('V', BASE_VIDIOC_PRIVATE + 35, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_CONT_CMD \
_IOWR('V', BASE_VIDIOC_PRIVATE + 36, struct msm_buf_mngr_main_cont_info)
#define VIDIOC_MSM_BUF_MNGR_INIT \
_IOWR('V', BASE_VIDIOC_PRIVATE + 37, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_DEINIT \
_IOWR('V', BASE_VIDIOC_PRIVATE + 38, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_FLUSH \
_IOWR('V', BASE_VIDIOC_PRIVATE + 39, struct msm_buf_mngr_info)
#define VIDIOC_MSM_BUF_MNGR_IOCTL_CMD \
_IOWR('V', BASE_VIDIOC_PRIVATE + 40, \
struct msm_camera_private_ioctl_arg)
#define VIDIOC_MSM_BUF_MNGR_BUF_ERROR \
_IOWR('V', BASE_VIDIOC_PRIVATE + 41, struct msm_buf_mngr_info)
#endif

View file

@ -0,0 +1,179 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef UAPI_MSMB_ISPIF_H
#define UAPI_MSMB_ISPIF_H
#include <linux/types.h>
#include <linux/ioctl.h>
#include <linux/videodev2.h>
#define CSID_VERSION_V20 0x02000011
#define CSID_VERSION_V22 0x02001000
#define CSID_VERSION_V30 0x30000000
#define CSID_VERSION_V3 0x30000000
enum msm_ispif_vfe_intf {
VFE0,
VFE1,
VFE_MAX
};
#define VFE0_MASK (1 << VFE0)
#define VFE1_MASK (1 << VFE1)
enum msm_ispif_intftype {
PIX0,
RDI0,
PIX1,
RDI1,
RDI2,
INTF_MAX
};
#define MAX_PARAM_ENTRIES (INTF_MAX * 2)
#define MAX_CID_CH 8
#define MAX_CID_CH_PARAM_ENTRY 3
#define PIX0_MASK (1 << PIX0)
#define PIX1_MASK (1 << PIX1)
#define RDI0_MASK (1 << RDI0)
#define RDI1_MASK (1 << RDI1)
#define RDI2_MASK (1 << RDI2)
enum msm_ispif_vc {
VC0,
VC1,
VC2,
VC3,
VC_MAX
};
enum msm_ispif_cid {
CID0,
CID1,
CID2,
CID3,
CID4,
CID5,
CID6,
CID7,
CID8,
CID9,
CID10,
CID11,
CID12,
CID13,
CID14,
CID15,
CID_MAX
};
enum msm_ispif_csid {
CSID0,
CSID1,
CSID2,
CSID3,
CSID_MAX
};
enum msm_ispif_pixel_odd_even {
PIX_EVEN,
PIX_ODD
};
enum msm_ispif_pixel_pack_mode {
PACK_BYTE,
PACK_PLAIN_PACK,
PACK_NV_P8,
PACK_NV_P16
};
struct msm_ispif_pack_cfg {
int pixel_swap_en;
enum msm_ispif_pixel_odd_even even_odd_sel;
enum msm_ispif_pixel_pack_mode pack_mode;
};
struct msm_ispif_params_entry {
enum msm_ispif_vfe_intf vfe_intf;
enum msm_ispif_intftype intftype;
int num_cids;
enum msm_ispif_cid cids[MAX_CID_CH_PARAM_ENTRY];
enum msm_ispif_csid csid;
int crop_enable;
uint16_t crop_start_pixel;
uint16_t crop_end_pixel;
};
struct msm_ispif_right_param_entry {
enum msm_ispif_cid cids[MAX_CID_CH_PARAM_ENTRY];
enum msm_ispif_csid csid;
};
struct msm_ispif_param_data_ext {
uint32_t num;
struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES];
struct msm_ispif_pack_cfg pack_cfg[CID_MAX];
struct msm_ispif_right_param_entry right_entries[MAX_PARAM_ENTRIES];
uint32_t stereo_enable;
uint16_t line_width[VFE_MAX];
};
struct msm_ispif_param_data {
uint32_t num;
struct msm_ispif_params_entry entries[MAX_PARAM_ENTRIES];
};
struct msm_isp_info {
uint32_t max_resolution;
uint32_t id;
uint32_t ver;
};
struct msm_ispif_vfe_info {
int num_vfe;
struct msm_isp_info info[VFE_MAX];
};
enum ispif_cfg_type_t {
ISPIF_CLK_ENABLE,
ISPIF_CLK_DISABLE,
ISPIF_INIT,
ISPIF_CFG,
ISPIF_START_FRAME_BOUNDARY,
ISPIF_RESTART_FRAME_BOUNDARY,
ISPIF_STOP_FRAME_BOUNDARY,
ISPIF_STOP_IMMEDIATELY,
ISPIF_RELEASE,
ISPIF_ENABLE_REG_DUMP,
ISPIF_SET_VFE_INFO,
ISPIF_CFG2,
ISPIF_CFG_STEREO,
};
struct ispif_cfg_data {
enum ispif_cfg_type_t cfg_type;
union {
int reg_dump; /* ISPIF_ENABLE_REG_DUMP */
uint32_t csid_version; /* ISPIF_INIT */
struct msm_ispif_vfe_info vfe_info; /* ISPIF_SET_VFE_INFO */
struct msm_ispif_param_data params; /* CFG, START, STOP */
};
};
struct ispif_cfg_data_ext {
enum ispif_cfg_type_t cfg_type;
void __user *data;
uint32_t size;
};
#define ISPIF_RDI_PACK_MODE_SUPPORT 1
#define ISPIF_3D_SUPPORT 1
#define ISPIF_LINE_WIDTH_SUPPORT 1
#define VIDIOC_MSM_ISPIF_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE, struct ispif_cfg_data)
#define VIDIOC_MSM_ISPIF_CFG_EXT \
_IOWR('V', BASE_VIDIOC_PRIVATE+1, struct ispif_cfg_data_ext)
#endif

View file

@ -0,0 +1,255 @@
/* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
#ifndef __UAPI_MSMB_PPROC_H
#define __UAPI_MSMB_PPROC_H
#include <linux/videodev2.h>
#include <linux/types.h>
#include <media/msmb_generic_buf_mgr.h>
/* Should be same as VIDEO_MAX_PLANES in videodev2.h */
#define MAX_PLANES VIDEO_MAX_PLANES
/* PARTIAL_FRAME_STRIPE_COUNT must be even */
#define PARTIAL_FRAME_STRIPE_COUNT 4
#define MAX_NUM_CPP_STRIPS 8
#define MSM_CPP_MAX_NUM_PLANES 3
#define MSM_CPP_MIN_FRAME_LENGTH 13
#define MSM_CPP_MAX_FRAME_LENGTH 4096
#define MSM_CPP_MAX_FW_NAME_LEN 32
#define MAX_FREQ_TBL 10
#define MSM_OUTPUT_BUF_CNT 8
enum msm_cpp_frame_type {
MSM_CPP_OFFLINE_FRAME,
MSM_CPP_REALTIME_FRAME,
};
enum msm_vpe_frame_type {
MSM_VPE_OFFLINE_FRAME,
MSM_VPE_REALTIME_FRAME,
};
struct msm_cpp_buffer_info_t {
int32_t fd;
uint32_t index;
uint32_t offset;
uint8_t native_buff;
uint8_t processed_divert;
uint32_t identity;
};
struct msm_cpp_stream_buff_info_t {
uint32_t identity;
uint32_t num_buffs;
struct msm_cpp_buffer_info_t *buffer_info;
};
enum msm_cpp_batch_mode_t {
BATCH_MODE_NONE,
BATCH_MODE_VIDEO,
BATCH_MODE_PREVIEW
};
struct msm_cpp_batch_info_t {
enum msm_cpp_batch_mode_t batch_mode;
uint32_t batch_size;
uint32_t intra_plane_offset[MAX_PLANES];
uint32_t pick_preview_idx;
uint32_t cont_idx;
};
struct msm_cpp_frame_info_t {
int32_t frame_id;
struct timeval timestamp;
uint32_t inst_id;
uint32_t identity;
uint32_t client_id;
enum msm_cpp_frame_type frame_type;
uint32_t num_strips;
uint32_t msg_len;
uint32_t *cpp_cmd_msg;
int src_fd;
int dst_fd;
struct timeval in_time, out_time;
void __user *cookie;
int32_t *status;
int32_t duplicate_output;
uint32_t duplicate_identity;
uint32_t feature_mask;
uint8_t we_disable;
struct msm_cpp_buffer_info_t input_buffer_info;
struct msm_cpp_buffer_info_t output_buffer_info[MSM_OUTPUT_BUF_CNT];
struct msm_cpp_buffer_info_t duplicate_buffer_info;
struct msm_cpp_buffer_info_t tnr_scratch_buffer_info[2];
uint32_t reserved;
uint8_t partial_frame_indicator;
/* the following are used only for partial_frame type
* and is only used for offline frame processing and
* only if payload big enough and need to be split into partial_frame
* if first_payload, kernel acquires output buffer
* first payload must have the last stripe
* buffer addresses from 0 to last_stripe_index are updated.
* kernel updates payload with msg_len and stripe_info
* kernel sends top level, plane level, then only stripes
* starting with first_stripe_index and
* ends with last_stripe_index
* kernel then sends trailing flag at frame done,
* if last payload, kernel queues the output buffer to HAL
*/
uint8_t first_payload;
uint8_t last_payload;
uint32_t first_stripe_index;
uint32_t last_stripe_index;
uint32_t stripe_info_offset;
uint32_t stripe_info;
struct msm_cpp_batch_info_t batch_info;
};
struct msm_cpp_pop_stream_info_t {
int32_t frame_id;
uint32_t identity;
};
struct cpp_hw_info {
uint32_t cpp_hw_version;
uint32_t cpp_hw_caps;
unsigned long freq_tbl[MAX_FREQ_TBL];
uint32_t freq_tbl_count;
};
struct msm_vpe_frame_strip_info {
uint32_t src_w;
uint32_t src_h;
uint32_t dst_w;
uint32_t dst_h;
uint32_t src_x;
uint32_t src_y;
uint32_t phase_step_x;
uint32_t phase_step_y;
uint32_t phase_init_x;
uint32_t phase_init_y;
};
struct msm_vpe_buffer_info_t {
int32_t fd;
uint32_t index;
uint32_t offset;
uint8_t native_buff;
uint8_t processed_divert;
};
struct msm_vpe_stream_buff_info_t {
uint32_t identity;
uint32_t num_buffs;
struct msm_vpe_buffer_info_t *buffer_info;
};
struct msm_vpe_frame_info_t {
int32_t frame_id;
struct timeval timestamp;
uint32_t inst_id;
uint32_t identity;
uint32_t client_id;
enum msm_vpe_frame_type frame_type;
struct msm_vpe_frame_strip_info strip_info;
unsigned long src_fd;
unsigned long dst_fd;
struct ion_handle *src_ion_handle;
struct ion_handle *dest_ion_handle;
unsigned long src_phyaddr;
unsigned long dest_phyaddr;
unsigned long src_chroma_plane_offset;
unsigned long dest_chroma_plane_offset;
struct timeval in_time, out_time;
void *cookie;
struct msm_vpe_buffer_info_t input_buffer_info;
struct msm_vpe_buffer_info_t output_buffer_info;
};
struct msm_pproc_queue_buf_info {
struct msm_buf_mngr_info buff_mgr_info;
uint8_t is_buf_dirty;
};
struct msm_cpp_clock_settings_t {
unsigned long clock_rate;
uint64_t avg;
uint64_t inst;
};
#define VIDIOC_MSM_CPP_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_GET_EVENTPAYLOAD \
_IOWR('V', BASE_VIDIOC_PRIVATE + 1, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_GET_INST_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 2, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_LOAD_FIRMWARE \
_IOWR('V', BASE_VIDIOC_PRIVATE + 3, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_GET_HW_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 4, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_FLUSH_QUEUE \
_IOWR('V', BASE_VIDIOC_PRIVATE + 5, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_ENQUEUE_STREAM_BUFF_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 6, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_DEQUEUE_STREAM_BUFF_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 7, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_CFG \
_IOWR('V', BASE_VIDIOC_PRIVATE + 8, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_TRANSACTION_SETUP \
_IOWR('V', BASE_VIDIOC_PRIVATE + 9, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_GET_EVENTPAYLOAD \
_IOWR('V', BASE_VIDIOC_PRIVATE + 10, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_GET_INST_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 11, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_ENQUEUE_STREAM_BUFF_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 12, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_VPE_DEQUEUE_STREAM_BUFF_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 13, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_QUEUE_BUF \
_IOWR('V', BASE_VIDIOC_PRIVATE + 14, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_APPEND_STREAM_BUFF_INFO \
_IOWR('V', BASE_VIDIOC_PRIVATE + 15, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_SET_CLOCK \
_IOWR('V', BASE_VIDIOC_PRIVATE + 16, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_POP_STREAM_BUFFER \
_IOWR('V', BASE_VIDIOC_PRIVATE + 17, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_IOMMU_ATTACH \
_IOWR('V', BASE_VIDIOC_PRIVATE + 18, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_IOMMU_DETACH \
_IOWR('V', BASE_VIDIOC_PRIVATE + 19, struct msm_camera_v4l2_ioctl_t)
#define VIDIOC_MSM_CPP_DELETE_STREAM_BUFF\
_IOWR('V', BASE_VIDIOC_PRIVATE + 20, struct msm_camera_v4l2_ioctl_t)
#define V4L2_EVENT_CPP_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 0)
#define V4L2_EVENT_VPE_FRAME_DONE (V4L2_EVENT_PRIVATE_START + 1)
struct msm_camera_v4l2_ioctl_t {
uint32_t id;
size_t len;
int32_t trans_code;
void __user *ioctl_ptr;
};
#endif