hc
2023-12-11 6778948f9de86c3cfaf36725a7c87dcff9ba247f
kernel/include/uapi/linux/rkcif-config.h
....@@ -9,7 +9,11 @@
99 #include <linux/types.h>
1010 #include <linux/v4l2-controls.h>
1111
12
-#define RKCIF_API_VERSION KERNEL_VERSION(0, 1, 0xa)
12
+#define RKCIF_MAX_CSI_NUM 4
13
+
14
+#define RKCIF_API_VERSION KERNEL_VERSION(0, 2, 0)
15
+
16
+#define V4L2_EVENT_RESET_DEV 0X1001
1317
1418 #define RKCIF_CMD_GET_CSI_MEMORY_MODE \
1519 _IOR('V', BASE_VIDIOC_PRIVATE + 0, int)
....@@ -17,11 +21,20 @@
1721 #define RKCIF_CMD_SET_CSI_MEMORY_MODE \
1822 _IOW('V', BASE_VIDIOC_PRIVATE + 1, int)
1923
20
-#define RKCIF_CMD_GET_RESET_INFO \
21
- _IOR('V', BASE_VIDIOC_PRIVATE + 5, struct rkcif_reset_info)
24
+#define RKCIF_CMD_GET_SCALE_BLC \
25
+ _IOR('V', BASE_VIDIOC_PRIVATE + 2, struct bayer_blc)
26
+
27
+#define RKCIF_CMD_SET_SCALE_BLC \
28
+ _IOW('V', BASE_VIDIOC_PRIVATE + 3, struct bayer_blc)
29
+
30
+#define RKCIF_CMD_SET_FPS \
31
+ _IOW('V', BASE_VIDIOC_PRIVATE + 4, struct rkcif_fps)
2232
2333 #define RKCIF_CMD_SET_RESET \
2434 _IOW('V', BASE_VIDIOC_PRIVATE + 6, int)
35
+
36
+#define RKCIF_CMD_SET_CSI_IDX \
37
+ _IOW('V', BASE_VIDIOC_PRIVATE + 7, struct rkcif_csi_info)
2538
2639 /* cif memory mode
2740 * 0: raw12/raw10/raw8 8bit memory compact
....@@ -44,9 +57,26 @@
4457 CSI_LVDS_MEM_WORD_HIGH_ALIGN = 2,
4558 };
4659
47
-struct rkcif_reset_info {
48
- int is_need_reset;
49
- int reset_src;
60
+/* black level for scale image
61
+ * The sequence of pattern00~03 is the same as the output of sensor bayer
62
+ */
63
+
64
+struct bayer_blc {
65
+ __u8 pattern00;
66
+ __u8 pattern01;
67
+ __u8 pattern02;
68
+ __u8 pattern03;
69
+};
70
+
71
+struct rkcif_fps {
72
+ int ch_num;
73
+ int fps;
74
+};
75
+
76
+struct rkcif_csi_info {
77
+ int csi_num;
78
+ int csi_idx[RKCIF_MAX_CSI_NUM];
79
+ int dphy_vendor[RKCIF_MAX_CSI_NUM];
5080 };
5181
5282 #endif