hc
2024-01-03 2f7c68cb55ecb7331f2381deb497c27155f32faf
kernel/drivers/media/platform/rockchip/isp/dev.h
....@@ -81,6 +81,7 @@
8181 ISP_START = BIT(9),
8282 ISP_ERROR = BIT(10),
8383 ISP_MIPI_ERROR = BIT(11),
84
+ ISP_CIF_RESET = BIT(12),
8485 };
8586
8687 enum rkisp_isp_inp {
....@@ -101,6 +102,25 @@
101102 RDBK_F_RD1,
102103 RDBK_F_RD2,
103104 RDBK_F_MAX
105
+};
106
+
107
+/* unite mode for isp to process high resolution
108
+ * ISP_UNITE_TWO: image splits left and right to two isp hardware
109
+ * ISP_UNITE_ONE: image splits left and right to single isp hardware
110
+ */
111
+enum {
112
+ ISP_UNITE_NONE = 0,
113
+ ISP_UNITE_TWO = 1,
114
+ ISP_UNITE_ONE = 2,
115
+};
116
+
117
+/* left and right index
118
+ * ISP_UNITE_LEFT: left of image to isp process
119
+ * ISP_UNITE_RIGHT: right of image to isp process
120
+ */
121
+enum {
122
+ ISP_UNITE_LEFT = 0,
123
+ ISP_UNITE_RIGHT = 1,
104124 };
105125
106126 /*
....@@ -216,6 +236,10 @@
216236 size_t resmem_size;
217237 struct rkisp_thunderboot_resmem_head tb_head;
218238 bool is_thunderboot;
239
+ /* first frame for rtt */
240
+ bool is_rtt_first;
241
+ /* suspend/resume with rtt */
242
+ bool is_rtt_suspend;
219243 struct rkisp_tb_stream_info tb_stream_info;
220244 unsigned int tb_addr_idx;
221245
....@@ -226,6 +250,8 @@
226250 bool send_fbcgain;
227251 struct rkisp_ispp_buf *cur_fbcgain;
228252 struct rkisp_buffer *cur_spbuf;
253
+
254
+ struct completion pm_cmpl;
229255
230256 struct work_struct rdbk_work;
231257 struct kfifo rdbk_kfifo;
....@@ -249,11 +275,47 @@
249275 bool is_pre_on;
250276 bool is_first_double;
251277 bool is_probe_end;
278
+ bool is_frame_double;
279
+ bool is_suspend;
280
+ bool suspend_sync;
281
+ bool is_suspend_one_frame;
252282
253283 struct rkisp_vicap_input vicap_in;
254284
255285 u8 multi_mode;
256286 u8 multi_index;
257287 u8 rawaf_irq_cnt;
288
+ u8 unite_index;
258289 };
290
+
291
+static inline void
292
+rkisp_unite_write(struct rkisp_device *dev, u32 reg, u32 val, bool is_direct)
293
+{
294
+ rkisp_write(dev, reg, val, is_direct);
295
+ if (dev->hw_dev->unite)
296
+ rkisp_next_write(dev, reg, val, is_direct);
297
+}
298
+
299
+static inline void
300
+rkisp_unite_set_bits(struct rkisp_device *dev, u32 reg, u32 mask,
301
+ u32 val, bool is_direct)
302
+{
303
+ rkisp_set_bits(dev, reg, mask, val, is_direct);
304
+ if (dev->hw_dev->unite)
305
+ rkisp_next_set_bits(dev, reg, mask, val, is_direct);
306
+}
307
+
308
+static inline void
309
+rkisp_unite_clear_bits(struct rkisp_device *dev, u32 reg, u32 mask,
310
+ bool is_direct)
311
+{
312
+ rkisp_clear_bits(dev, reg, mask, is_direct);
313
+ if (dev->hw_dev->unite)
314
+ rkisp_next_clear_bits(dev, reg, mask, is_direct);
315
+}
316
+
317
+static inline bool rkisp_link_sensor(u32 isp_inp)
318
+{
319
+ return isp_inp & (INP_CSI | INP_DVP | INP_LVDS);
320
+}
259321 #endif