.. | .. |
---|
17 | 17 | #include <media/v4l2-mc.h> |
---|
18 | 18 | #include <linux/rk-camera-module.h> |
---|
19 | 19 | #include "hw.h" |
---|
| 20 | +#include "../isp/isp_external.h" |
---|
| 21 | + |
---|
| 22 | +#define RKISP0_DEVNAME "rkisp0" |
---|
| 23 | +#define RKISP1_DEVNAME "rkisp1" |
---|
| 24 | +#define RKISP_UNITE_DEVNAME "rkisp-unite" |
---|
| 25 | + |
---|
| 26 | +#define RKCIF_TOISP_CH0 0 |
---|
| 27 | +#define RKCIF_TOISP_CH1 1 |
---|
| 28 | +#define RKCIF_TOISP_CH2 2 |
---|
| 29 | +#define TOISP_CH_MAX 3 |
---|
| 30 | + |
---|
| 31 | +#define SDITF_PIXEL_RATE_MAX (1000000000) |
---|
| 32 | + |
---|
| 33 | +struct capture_info { |
---|
| 34 | + unsigned int offset_x; |
---|
| 35 | + unsigned int offset_y; |
---|
| 36 | + unsigned int width; |
---|
| 37 | + unsigned int height; |
---|
| 38 | +}; |
---|
| 39 | + |
---|
| 40 | +enum toisp_link_mode { |
---|
| 41 | + TOISP_NONE, |
---|
| 42 | + TOISP0, |
---|
| 43 | + TOISP1, |
---|
| 44 | + TOISP_UNITE, |
---|
| 45 | +}; |
---|
| 46 | + |
---|
| 47 | +struct toisp_ch_info { |
---|
| 48 | + bool is_valid; |
---|
| 49 | + int id; |
---|
| 50 | +}; |
---|
| 51 | + |
---|
| 52 | +struct toisp_info { |
---|
| 53 | + struct toisp_ch_info ch_info[TOISP_CH_MAX]; |
---|
| 54 | + enum toisp_link_mode link_mode; |
---|
| 55 | +}; |
---|
| 56 | + |
---|
| 57 | +struct sditf_work_struct { |
---|
| 58 | + struct work_struct work; |
---|
| 59 | + struct rkisp_rx_buffer *buf; |
---|
| 60 | +}; |
---|
20 | 61 | |
---|
21 | 62 | struct sditf_priv { |
---|
22 | 63 | struct device *dev; |
---|
| 64 | + struct v4l2_async_notifier notifier; |
---|
23 | 65 | struct v4l2_subdev sd; |
---|
24 | | - struct media_pad pads; |
---|
| 66 | + struct media_pad pads[2]; |
---|
25 | 67 | struct rkcif_device *cif_dev; |
---|
| 68 | + struct rkmodule_hdr_cfg hdr_cfg; |
---|
| 69 | + struct capture_info cap_info; |
---|
| 70 | + struct rkisp_vicap_mode mode; |
---|
| 71 | + struct toisp_info toisp_inf; |
---|
| 72 | + struct v4l2_ctrl *pixel_rate; |
---|
| 73 | + struct v4l2_ctrl_handler ctrl_handler; |
---|
| 74 | + struct v4l2_subdev *sensor_sd; |
---|
| 75 | + struct sditf_work_struct buffree_work; |
---|
| 76 | + struct list_head buf_free_list; |
---|
| 77 | + int buf_num; |
---|
| 78 | + int num_sensors; |
---|
| 79 | + int combine_index; |
---|
| 80 | + bool is_combine_mode; |
---|
| 81 | + atomic_t power_cnt; |
---|
| 82 | + atomic_t stream_cnt; |
---|
26 | 83 | }; |
---|
27 | 84 | |
---|
28 | 85 | extern struct platform_driver rkcif_subdev_driver; |
---|
| 86 | +void sditf_change_to_online(struct sditf_priv *priv); |
---|
| 87 | +void sditf_disable_immediately(struct sditf_priv *priv); |
---|
29 | 88 | |
---|
30 | 89 | #endif |
---|