hc
2024-05-14 bedbef8ad3e75a304af6361af235302bcc61d06b
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
/* SPDX-License-Identifier: GPL-2.0 */
/* Copyright (c) 2019 Fuzhou Rockchip Electronics Co., Ltd. */
 
#ifndef _RKISP_ISP_STATS_V2X_H
#define _RKISP_ISP_STATS_V2X_H
 
#include <linux/rk-isp1-config.h>
#include <linux/interrupt.h>
#include <linux/kfifo.h>
#include "common.h"
 
// #define RKISP_RD_STATS_FROM_DDR
#define RKISP_RD_STATS_BUF_SIZE        0x35000
 
struct rkisp_isp_stats_vdev;
struct rkisp_stats_v2x_ops {
   void (*get_siawb_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                  struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawawb_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
               struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_siaf_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                 struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawaf_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                  struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_yuvae_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                  struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_sihst_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                  struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_rawae0_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
               struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawhst0_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_rawae1_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
               struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawhst1_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_rawae2_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
               struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawhst2_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_rawae3_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
               struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_rawhst3_meas)(struct rkisp_isp_stats_vdev *stats_vdev,
                struct rkisp_isp2x_stat_buffer *pbuf);
 
   void (*get_bls_stats)(struct rkisp_isp_stats_vdev *stats_vdev,
                 struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_tmo_stats)(struct rkisp_isp_stats_vdev *stats_vdev,
                 struct rkisp_isp2x_stat_buffer *pbuf);
   void (*get_dhaz_stats)(struct rkisp_isp_stats_vdev *stats_vdev,
                  struct rkisp_isp2x_stat_buffer *pbuf);
};
 
#if IS_ENABLED(CONFIG_VIDEO_ROCKCHIP_ISP_VERSION_V20)
void rkisp_stats_first_ddr_config_v2x(struct rkisp_isp_stats_vdev *stats_vdev);
void rkisp_init_stats_vdev_v2x(struct rkisp_isp_stats_vdev *stats_vdev);
void rkisp_uninit_stats_vdev_v2x(struct rkisp_isp_stats_vdev *stats_vdev);
#else
static inline void rkisp_stats_first_ddr_config_v2x(struct rkisp_isp_stats_vdev *stats_vdev) {}
static inline void rkisp_init_stats_vdev_v2x(struct rkisp_isp_stats_vdev *stats_vdev) {}
static inline void rkisp_uninit_stats_vdev_v2x(struct rkisp_isp_stats_vdev *stats_vdev) {}
#endif
 
#endif /* _RKISP_ISP_STATS_V2X_H */