1 /* SPDX-License-Identifier: (GPL-2.0+ OR MIT) */
2 /*
3 * Rockchip ISP1 Driver - Common definitions
4 *
5 * Copyright (C) 2019 Collabora, Ltd.
6 *
7 * Based on Rockchip ISP1 driver by Rockchip Electronics Co., Ltd.
8 * Copyright (C) 2017 Rockchip Electronics Co., Ltd.
9 */
10
11 #ifndef _RKISP1_COMMON_H
12 #define _RKISP1_COMMON_H
13
14 #include <linux/clk.h>
15 #include <linux/interrupt.h>
16 #include <linux/mutex.h>
17 #include <linux/rkisp1-config.h>
18 #include <media/media-device.h>
19 #include <media/media-entity.h>
20 #include <media/v4l2-ctrls.h>
21 #include <media/v4l2-device.h>
22 #include <media/videobuf2-v4l2.h>
23
24 #include "rkisp1-regs.h"
25
26 struct dentry;
27
28 /*
29 * flags on the 'direction' field in struct rkisp1_mbus_info' that indicate
30 * on which pad the media bus format is supported
31 */
32 #define RKISP1_ISP_SD_SRC BIT(0)
33 #define RKISP1_ISP_SD_SINK BIT(1)
34
35 /* min and max values for the widths and heights of the entities */
36 #define RKISP1_ISP_MAX_WIDTH 4032
37 #define RKISP1_ISP_MAX_HEIGHT 3024
38 #define RKISP1_ISP_MIN_WIDTH 32
39 #define RKISP1_ISP_MIN_HEIGHT 32
40
41 #define RKISP1_RSZ_MP_SRC_MAX_WIDTH 4416
42 #define RKISP1_RSZ_MP_SRC_MAX_HEIGHT 3312
43 #define RKISP1_RSZ_SP_SRC_MAX_WIDTH 1920
44 #define RKISP1_RSZ_SP_SRC_MAX_HEIGHT 1920
45 #define RKISP1_RSZ_SRC_MIN_WIDTH 32
46 #define RKISP1_RSZ_SRC_MIN_HEIGHT 16
47
48 /* the default width and height of all the entities */
49 #define RKISP1_DEFAULT_WIDTH 800
50 #define RKISP1_DEFAULT_HEIGHT 600
51
52 #define RKISP1_DRIVER_NAME "rkisp1"
53 #define RKISP1_BUS_INFO "platform:" RKISP1_DRIVER_NAME
54
55 /* maximum number of clocks */
56 #define RKISP1_MAX_BUS_CLK 8
57
58 /* a bitmask of the ready stats */
59 #define RKISP1_STATS_MEAS_MASK (RKISP1_CIF_ISP_AWB_DONE | \
60 RKISP1_CIF_ISP_AFM_FIN | \
61 RKISP1_CIF_ISP_EXP_END | \
62 RKISP1_CIF_ISP_HIST_MEASURE_RDY)
63
64 /* IRQ lines */
65 enum rkisp1_irq_line {
66 RKISP1_IRQ_ISP = 0,
67 RKISP1_IRQ_MI,
68 RKISP1_IRQ_MIPI,
69 RKISP1_NUM_IRQS,
70 };
71
72 /* enum for the resizer pads */
73 enum rkisp1_rsz_pad {
74 RKISP1_RSZ_PAD_SINK,
75 RKISP1_RSZ_PAD_SRC,
76 RKISP1_RSZ_PAD_MAX
77 };
78
79 /* enum for the csi receiver pads */
80 enum rkisp1_csi_pad {
81 RKISP1_CSI_PAD_SINK,
82 RKISP1_CSI_PAD_SRC,
83 RKISP1_CSI_PAD_NUM
84 };
85
86 /* enum for the capture id */
87 enum rkisp1_stream_id {
88 RKISP1_MAINPATH,
89 RKISP1_SELFPATH,
90 };
91
92 /* bayer patterns */
93 enum rkisp1_fmt_raw_pat_type {
94 RKISP1_RAW_RGGB = 0,
95 RKISP1_RAW_GRBG,
96 RKISP1_RAW_GBRG,
97 RKISP1_RAW_BGGR,
98 };
99
100 /* enum for the isp pads */
101 enum rkisp1_isp_pad {
102 RKISP1_ISP_PAD_SINK_VIDEO,
103 RKISP1_ISP_PAD_SINK_PARAMS,
104 RKISP1_ISP_PAD_SOURCE_VIDEO,
105 RKISP1_ISP_PAD_SOURCE_STATS,
106 RKISP1_ISP_PAD_MAX
107 };
108
109 /*
110 * enum rkisp1_feature - ISP features
111 *
112 * @RKISP1_FEATURE_MIPI_CSI2: The ISP has an internal MIPI CSI-2 receiver
113 *
114 * The ISP features are stored in a bitmask in &rkisp1_info.features and allow
115 * the driver to implement support for features present in some ISP versions
116 * only.
117 */
118 enum rkisp1_feature {
119 RKISP1_FEATURE_MIPI_CSI2 = BIT(0),
120 };
121
122 /*
123 * struct rkisp1_info - Model-specific ISP Information
124 *
125 * @clks: array of ISP clock names
126 * @clk_size: number of entries in the @clks array
127 * @isrs: array of ISP interrupt descriptors
128 * @isr_size: number of entries in the @isrs array
129 * @isp_ver: ISP version
130 * @features: bitmask of rkisp1_feature features implemented by the ISP
131 *
132 * This structure contains information about the ISP specific to a particular
133 * ISP model, version, or integration in a particular SoC.
134 */
135 struct rkisp1_info {
136 const char * const *clks;
137 unsigned int clk_size;
138 const struct rkisp1_isr_data *isrs;
139 unsigned int isr_size;
140 enum rkisp1_cif_isp_version isp_ver;
141 unsigned int features;
142 };
143
144 /*
145 * struct rkisp1_sensor_async - A container for the v4l2_async_subdev to add to the notifier
146 * of the v4l2-async API
147 *
148 * @asd: async_subdev variable for the sensor
149 * @index: index of the sensor (counting sensor found in DT)
150 * @source_ep: fwnode for the sensor source endpoint
151 * @lanes: number of lanes
152 * @mbus_type: type of bus (currently only CSI2 is supported)
153 * @mbus_flags: media bus (V4L2_MBUS_*) flags
154 * @sd: a pointer to v4l2_subdev struct of the sensor
155 * @pixel_rate_ctrl: pixel rate of the sensor, used to initialize the phy
156 * @port: port number (0: MIPI, 1: Parallel)
157 */
158 struct rkisp1_sensor_async {
159 struct v4l2_async_connection asd;
160 unsigned int index;
161 struct fwnode_handle *source_ep;
162 unsigned int lanes;
163 enum v4l2_mbus_type mbus_type;
164 unsigned int mbus_flags;
165 struct v4l2_subdev *sd;
166 struct v4l2_ctrl *pixel_rate_ctrl;
167 unsigned int port;
168 };
169
170 /*
171 * struct rkisp1_csi - CSI receiver subdev
172 *
173 * @rkisp1: pointer to the rkisp1 device
174 * @dphy: a pointer to the phy
175 * @is_dphy_errctrl_disabled: if dphy errctrl is disabled (avoid endless interrupt)
176 * @sd: v4l2_subdev variable
177 * @pads: media pads
178 * @source: source in-use, set when starting streaming
179 */
180 struct rkisp1_csi {
181 struct rkisp1_device *rkisp1;
182 struct phy *dphy;
183 bool is_dphy_errctrl_disabled;
184 struct v4l2_subdev sd;
185 struct media_pad pads[RKISP1_CSI_PAD_NUM];
186 struct v4l2_subdev *source;
187 };
188
189 /*
190 * struct rkisp1_isp - ISP subdev entity
191 *
192 * @sd: v4l2_subdev variable
193 * @rkisp1: pointer to rkisp1_device
194 * @pads: media pads
195 * @sink_fmt: input format
196 * @frame_sequence: used to synchronize frame_id between video devices.
197 */
198 struct rkisp1_isp {
199 struct v4l2_subdev sd;
200 struct rkisp1_device *rkisp1;
201 struct media_pad pads[RKISP1_ISP_PAD_MAX];
202 const struct rkisp1_mbus_info *sink_fmt;
203 __u32 frame_sequence;
204 };
205
206 /*
207 * struct rkisp1_vdev_node - Container for the video nodes: params, stats, mainpath, selfpath
208 *
209 * @buf_queue: queue of buffers
210 * @vlock: lock of the video node
211 * @vdev: video node
212 * @pad: media pad
213 */
214 struct rkisp1_vdev_node {
215 struct vb2_queue buf_queue;
216 struct mutex vlock; /* ioctl serialization mutex */
217 struct video_device vdev;
218 struct media_pad pad;
219 };
220
221 /*
222 * struct rkisp1_buffer - A container for the vb2 buffers used by the video devices:
223 * params, stats, mainpath, selfpath
224 *
225 * @vb: vb2 buffer
226 * @queue: entry of the buffer in the queue
227 * @buff_addr: dma addresses of each plane, used only by the capture devices: selfpath, mainpath
228 */
229 struct rkisp1_buffer {
230 struct vb2_v4l2_buffer vb;
231 struct list_head queue;
232 u32 buff_addr[VIDEO_MAX_PLANES];
233 };
234
235 /*
236 * struct rkisp1_dummy_buffer - A buffer to write the next frame to in case
237 * there are no vb2 buffers available.
238 *
239 * @vaddr: return value of call to dma_alloc_attrs.
240 * @dma_addr: dma address of the buffer.
241 * @size: size of the buffer.
242 */
243 struct rkisp1_dummy_buffer {
244 void *vaddr;
245 dma_addr_t dma_addr;
246 u32 size;
247 };
248
249 struct rkisp1_device;
250
251 /*
252 * struct rkisp1_capture - ISP capture video device
253 *
254 * @vnode: video node
255 * @rkisp1: pointer to rkisp1_device
256 * @id: id of the capture, one of RKISP1_SELFPATH, RKISP1_MAINPATH
257 * @ops: list of callbacks to configure the capture device.
258 * @config: a pointer to the list of registers to configure the capture format.
259 * @is_streaming: device is streaming
260 * @is_stopping: stop_streaming callback was called and the device is in the process of
261 * stopping the streaming.
262 * @done: when stop_streaming callback is called, the device waits for the next irq
263 * handler to stop the streaming by waiting on the 'done' wait queue.
264 * If the irq handler is not called, the stream is stopped by the callback
265 * after timeout.
266 * @sp_y_stride: the selfpath allows to configure a y stride that is longer than the image width.
267 * @buf.lock: lock to protect buf.queue
268 * @buf.queue: queued buffer list
269 * @buf.dummy: dummy space to store dropped data
270 *
271 * rkisp1 uses shadow registers, so it needs two buffers at a time
272 * @buf.curr: the buffer used for current frame
273 * @buf.next: the buffer used for next frame
274 * @pix.cfg: pixel configuration
275 * @pix.info: a pointer to the v4l2_format_info of the pixel format
276 * @pix.fmt: buffer format
277 */
278 struct rkisp1_capture {
279 struct rkisp1_vdev_node vnode;
280 struct rkisp1_device *rkisp1;
281 enum rkisp1_stream_id id;
282 const struct rkisp1_capture_ops *ops;
283 const struct rkisp1_capture_config *config;
284 bool is_streaming;
285 bool is_stopping;
286 wait_queue_head_t done;
287 unsigned int sp_y_stride;
288 struct {
289 /* protects queue, curr and next */
290 spinlock_t lock;
291 struct list_head queue;
292 struct rkisp1_dummy_buffer dummy;
293 struct rkisp1_buffer *curr;
294 struct rkisp1_buffer *next;
295 } buf;
296 struct {
297 const struct rkisp1_capture_fmt_cfg *cfg;
298 const struct v4l2_format_info *info;
299 struct v4l2_pix_format_mplane fmt;
300 } pix;
301 };
302
303 struct rkisp1_stats;
304 struct rkisp1_stats_ops {
305 void (*get_awb_meas)(struct rkisp1_stats *stats,
306 struct rkisp1_stat_buffer *pbuf);
307 void (*get_aec_meas)(struct rkisp1_stats *stats,
308 struct rkisp1_stat_buffer *pbuf);
309 void (*get_hst_meas)(struct rkisp1_stats *stats,
310 struct rkisp1_stat_buffer *pbuf);
311 };
312
313 /*
314 * struct rkisp1_stats - ISP Statistics device
315 *
316 * @vnode: video node
317 * @rkisp1: pointer to the rkisp1 device
318 * @lock: locks the buffer list 'stat'
319 * @stat: queue of rkisp1_buffer
320 * @vdev_fmt: v4l2_format of the metadata format
321 */
322 struct rkisp1_stats {
323 struct rkisp1_vdev_node vnode;
324 struct rkisp1_device *rkisp1;
325 const struct rkisp1_stats_ops *ops;
326
327 spinlock_t lock; /* locks the buffers list 'stats' */
328 struct list_head stat;
329 struct v4l2_format vdev_fmt;
330 };
331
332 struct rkisp1_params;
333 struct rkisp1_params_ops {
334 void (*lsc_matrix_config)(struct rkisp1_params *params,
335 const struct rkisp1_cif_isp_lsc_config *pconfig);
336 void (*goc_config)(struct rkisp1_params *params,
337 const struct rkisp1_cif_isp_goc_config *arg);
338 void (*awb_meas_config)(struct rkisp1_params *params,
339 const struct rkisp1_cif_isp_awb_meas_config *arg);
340 void (*awb_meas_enable)(struct rkisp1_params *params,
341 const struct rkisp1_cif_isp_awb_meas_config *arg,
342 bool en);
343 void (*awb_gain_config)(struct rkisp1_params *params,
344 const struct rkisp1_cif_isp_awb_gain_config *arg);
345 void (*aec_config)(struct rkisp1_params *params,
346 const struct rkisp1_cif_isp_aec_config *arg);
347 void (*hst_config)(struct rkisp1_params *params,
348 const struct rkisp1_cif_isp_hst_config *arg);
349 void (*hst_enable)(struct rkisp1_params *params,
350 const struct rkisp1_cif_isp_hst_config *arg, bool en);
351 void (*afm_config)(struct rkisp1_params *params,
352 const struct rkisp1_cif_isp_afc_config *arg);
353 };
354
355 /*
356 * struct rkisp1_params - ISP input parameters device
357 *
358 * @vnode: video node
359 * @rkisp1: pointer to the rkisp1 device
360 * @ops: pointer to the variant-specific operations
361 * @config_lock: locks the buffer list 'params'
362 * @params: queue of rkisp1_buffer
363 * @vdev_fmt: v4l2_format of the metadata format
364 * @quantization: the quantization configured on the isp's src pad
365 * @raw_type: the bayer pattern on the isp video sink pad
366 */
367 struct rkisp1_params {
368 struct rkisp1_vdev_node vnode;
369 struct rkisp1_device *rkisp1;
370 const struct rkisp1_params_ops *ops;
371
372 spinlock_t config_lock; /* locks the buffers list 'params' */
373 struct list_head params;
374 struct v4l2_format vdev_fmt;
375
376 enum v4l2_quantization quantization;
377 enum v4l2_ycbcr_encoding ycbcr_encoding;
378 enum rkisp1_fmt_raw_pat_type raw_type;
379 };
380
381 /*
382 * struct rkisp1_resizer - Resizer subdev
383 *
384 * @sd: v4l2_subdev variable
385 * @regs_base: base register address offset
386 * @id: id of the resizer, one of RKISP1_SELFPATH, RKISP1_MAINPATH
387 * @rkisp1: pointer to the rkisp1 device
388 * @pads: media pads
389 * @config: the set of registers to configure the resizer
390 */
391 struct rkisp1_resizer {
392 struct v4l2_subdev sd;
393 u32 regs_base;
394 enum rkisp1_stream_id id;
395 struct rkisp1_device *rkisp1;
396 struct media_pad pads[RKISP1_RSZ_PAD_MAX];
397 const struct rkisp1_rsz_config *config;
398 };
399
400 /*
401 * struct rkisp1_debug - Values to be exposed on debugfs.
402 * The parameters are counters of the number of times the
403 * event occurred since the driver was loaded.
404 *
405 * @data_loss: loss of data occurred within a line, processing failure
406 * @outform_size_error: size error is generated in outmux submodule
407 * @img_stabilization_size_error: size error is generated in image stabilization submodule
408 * @inform_size_err: size error is generated in inform submodule
409 * @mipi_error: mipi error occurred
410 * @stats_error: writing to the 'Interrupt clear register' did not clear
411 * it in the register 'Masked interrupt status'
412 * @stop_timeout: upon stream stop, the capture waits 1 second for the isr to stop
413 * the stream. This param is incremented in case of timeout.
414 * @frame_drop: a frame was ready but the buffer queue was empty so the frame
415 * was not sent to userspace
416 */
417 struct rkisp1_debug {
418 struct dentry *debugfs_dir;
419 unsigned long data_loss;
420 unsigned long outform_size_error;
421 unsigned long img_stabilization_size_error;
422 unsigned long inform_size_error;
423 unsigned long irq_delay;
424 unsigned long mipi_error;
425 unsigned long stats_error;
426 unsigned long stop_timeout[2];
427 unsigned long frame_drop[2];
428 unsigned long complete_frames;
429 };
430
431 /*
432 * struct rkisp1_device - ISP platform device
433 *
434 * @base_addr: base register address
435 * @dev: a pointer to the struct device
436 * @clk_size: number of clocks
437 * @clks: array of clocks
438 * @v4l2_dev: v4l2_device variable
439 * @media_dev: media_device variable
440 * @notifier: a notifier to register on the v4l2-async API to be notified on the sensor
441 * @source: source subdev in-use, set when starting streaming
442 * @csi: internal CSI-2 receiver
443 * @isp: ISP sub-device
444 * @resizer_devs: resizer sub-devices
445 * @capture_devs: capture devices
446 * @stats: ISP statistics metadata capture device
447 * @params: ISP parameters metadata output device
448 * @pipe: media pipeline
449 * @stream_lock: serializes {start/stop}_streaming callbacks between the capture devices.
450 * @debug: debug params to be exposed on debugfs
451 * @info: version-specific ISP information
452 * @irqs: IRQ line numbers
453 * @irqs_enabled: the hardware is enabled and can cause interrupts
454 */
455 struct rkisp1_device {
456 void __iomem *base_addr;
457 struct device *dev;
458 unsigned int clk_size;
459 struct clk_bulk_data clks[RKISP1_MAX_BUS_CLK];
460 struct v4l2_device v4l2_dev;
461 struct media_device media_dev;
462 struct v4l2_async_notifier notifier;
463 struct v4l2_subdev *source;
464 struct rkisp1_csi csi;
465 struct rkisp1_isp isp;
466 struct rkisp1_resizer resizer_devs[2];
467 struct rkisp1_capture capture_devs[2];
468 struct rkisp1_stats stats;
469 struct rkisp1_params params;
470 struct media_pipeline pipe;
471 struct mutex stream_lock; /* serialize {start/stop}_streaming cb between capture devices */
472 struct rkisp1_debug debug;
473 const struct rkisp1_info *info;
474 int irqs[RKISP1_NUM_IRQS];
475 bool irqs_enabled;
476 };
477
478 /*
479 * struct rkisp1_mbus_info - ISP media bus info, Translates media bus code to hardware
480 * format values
481 *
482 * @mbus_code: media bus code
483 * @pixel_enc: pixel encoding
484 * @mipi_dt: mipi data type
485 * @yuv_seq: the order of the Y, Cb, Cr values
486 * @bus_width: bus width
487 * @bayer_pat: bayer pattern
488 * @direction: a bitmask of the flags indicating on which pad the format is supported on
489 */
490 struct rkisp1_mbus_info {
491 u32 mbus_code;
492 enum v4l2_pixel_encoding pixel_enc;
493 u32 mipi_dt;
494 u32 yuv_seq;
495 u8 bus_width;
496 enum rkisp1_fmt_raw_pat_type bayer_pat;
497 unsigned int direction;
498 };
499
500 static inline void
rkisp1_write(struct rkisp1_device * rkisp1,unsigned int addr,u32 val)501 rkisp1_write(struct rkisp1_device *rkisp1, unsigned int addr, u32 val)
502 {
503 writel(val, rkisp1->base_addr + addr);
504 }
505
rkisp1_read(struct rkisp1_device * rkisp1,unsigned int addr)506 static inline u32 rkisp1_read(struct rkisp1_device *rkisp1, unsigned int addr)
507 {
508 return readl(rkisp1->base_addr + addr);
509 }
510
511 /*
512 * rkisp1_cap_enum_mbus_codes - A helper function that return the i'th supported mbus code
513 * of the capture entity. This is used to enumerate the supported
514 * mbus codes on the source pad of the resizer.
515 *
516 * @cap: the capture entity
517 * @code: the mbus code, the function reads the code->index and fills the code->code
518 */
519 int rkisp1_cap_enum_mbus_codes(struct rkisp1_capture *cap,
520 struct v4l2_subdev_mbus_code_enum *code);
521
522 /*
523 * rkisp1_mbus_info_get_by_index - Retrieve the ith supported mbus info
524 *
525 * @index: index of the mbus info to fetch
526 */
527 const struct rkisp1_mbus_info *rkisp1_mbus_info_get_by_index(unsigned int index);
528
529 /*
530 * rkisp1_sd_adjust_crop_rect - adjust a rectangle to fit into another rectangle.
531 *
532 * @crop: rectangle to adjust.
533 * @bounds: rectangle used as bounds.
534 */
535 void rkisp1_sd_adjust_crop_rect(struct v4l2_rect *crop,
536 const struct v4l2_rect *bounds);
537
538 /*
539 * rkisp1_sd_adjust_crop - adjust a rectangle to fit into media bus format
540 *
541 * @crop: rectangle to adjust.
542 * @bounds: media bus format used as bounds.
543 */
544 void rkisp1_sd_adjust_crop(struct v4l2_rect *crop,
545 const struct v4l2_mbus_framefmt *bounds);
546
547 /*
548 * rkisp1_mbus_info_get_by_code - get the isp info of the media bus code
549 *
550 * @mbus_code: the media bus code
551 */
552 const struct rkisp1_mbus_info *rkisp1_mbus_info_get_by_code(u32 mbus_code);
553
554 /*
555 * rkisp1_params_pre_configure - Configure the params before stream start
556 *
557 * @params: pointer to rkisp1_params
558 * @bayer_pat: the bayer pattern on the isp video sink pad
559 * @quantization: the quantization configured on the isp's src pad
560 * @ycbcr_encoding: the ycbcr_encoding configured on the isp's src pad
561 *
562 * This function is called by the ISP entity just before the ISP gets started.
563 * It applies the initial ISP parameters from the first params buffer, but
564 * skips LSC as it needs to be configured after the ISP is started.
565 */
566 void rkisp1_params_pre_configure(struct rkisp1_params *params,
567 enum rkisp1_fmt_raw_pat_type bayer_pat,
568 enum v4l2_quantization quantization,
569 enum v4l2_ycbcr_encoding ycbcr_encoding);
570
571 /*
572 * rkisp1_params_post_configure - Configure the params after stream start
573 *
574 * @params: pointer to rkisp1_params
575 *
576 * This function is called by the ISP entity just after the ISP gets started.
577 * It applies the initial ISP LSC parameters from the first params buffer.
578 */
579 void rkisp1_params_post_configure(struct rkisp1_params *params);
580
581 /* rkisp1_params_disable - disable all parameters.
582 * This function is called by the isp entity upon stream start
583 * when capturing bayer format.
584 *
585 * @params: pointer to rkisp1_params.
586 */
587 void rkisp1_params_disable(struct rkisp1_params *params);
588
589 /* irq handlers */
590 irqreturn_t rkisp1_isp_isr(int irq, void *ctx);
591 irqreturn_t rkisp1_csi_isr(int irq, void *ctx);
592 irqreturn_t rkisp1_capture_isr(int irq, void *ctx);
593 void rkisp1_stats_isr(struct rkisp1_stats *stats, u32 isp_ris);
594 void rkisp1_params_isr(struct rkisp1_device *rkisp1);
595
596 /* register/unregisters functions of the entities */
597 int rkisp1_capture_devs_register(struct rkisp1_device *rkisp1);
598 void rkisp1_capture_devs_unregister(struct rkisp1_device *rkisp1);
599
600 int rkisp1_isp_register(struct rkisp1_device *rkisp1);
601 void rkisp1_isp_unregister(struct rkisp1_device *rkisp1);
602
603 int rkisp1_resizer_devs_register(struct rkisp1_device *rkisp1);
604 void rkisp1_resizer_devs_unregister(struct rkisp1_device *rkisp1);
605
606 int rkisp1_stats_register(struct rkisp1_device *rkisp1);
607 void rkisp1_stats_unregister(struct rkisp1_device *rkisp1);
608
609 int rkisp1_params_register(struct rkisp1_device *rkisp1);
610 void rkisp1_params_unregister(struct rkisp1_device *rkisp1);
611
612 #if IS_ENABLED(CONFIG_DEBUG_FS)
613 void rkisp1_debug_init(struct rkisp1_device *rkisp1);
614 void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1);
615 #else
rkisp1_debug_init(struct rkisp1_device * rkisp1)616 static inline void rkisp1_debug_init(struct rkisp1_device *rkisp1)
617 {
618 }
rkisp1_debug_cleanup(struct rkisp1_device * rkisp1)619 static inline void rkisp1_debug_cleanup(struct rkisp1_device *rkisp1)
620 {
621 }
622 #endif
623
624 #endif /* _RKISP1_COMMON_H */
625