drm: bridge: adv7511: remove s32 format from i2s capabilities
[drm/drm-misc.git] / include / uapi / linux / media / raspberrypi / pisp_fe_statistics.h
bloba7d42985aee813338d909e6d0d3baaa92748a304
1 /* SPDX-License-Identifier: GPL-2.0-only WITH Linux-syscall-note */
2 /*
3 * RP1 PiSP Front End statistics definitions
5 * Copyright (C) 2021 - Raspberry Pi Ltd.
7 */
8 #ifndef _UAPI_PISP_FE_STATISTICS_H_
9 #define _UAPI_PISP_FE_STATISTICS_H_
11 #include <linux/types.h>
13 #define PISP_FLOATING_STATS_NUM_ZONES 4
14 #define PISP_AGC_STATS_NUM_BINS 1024
15 #define PISP_AGC_STATS_SIZE 16
16 #define PISP_AGC_STATS_NUM_ZONES (PISP_AGC_STATS_SIZE * PISP_AGC_STATS_SIZE)
17 #define PISP_AGC_STATS_NUM_ROW_SUMS 512
19 struct pisp_agc_statistics_zone {
20 __u64 Y_sum;
21 __u32 counted;
22 __u32 pad;
23 } __attribute__((packed));
25 struct pisp_agc_statistics {
26 __u32 row_sums[PISP_AGC_STATS_NUM_ROW_SUMS];
28 * 32-bits per bin means an image (just less than) 16384x16384 pixels
29 * in size can weight every pixel from 0 to 15.
31 __u32 histogram[PISP_AGC_STATS_NUM_BINS];
32 struct pisp_agc_statistics_zone floating[PISP_FLOATING_STATS_NUM_ZONES];
33 } __attribute__((packed));
35 #define PISP_AWB_STATS_SIZE 32
36 #define PISP_AWB_STATS_NUM_ZONES (PISP_AWB_STATS_SIZE * PISP_AWB_STATS_SIZE)
38 struct pisp_awb_statistics_zone {
39 __u32 R_sum;
40 __u32 G_sum;
41 __u32 B_sum;
42 __u32 counted;
43 } __attribute__((packed));
45 struct pisp_awb_statistics {
46 struct pisp_awb_statistics_zone zones[PISP_AWB_STATS_NUM_ZONES];
47 struct pisp_awb_statistics_zone floating[PISP_FLOATING_STATS_NUM_ZONES];
48 } __attribute__((packed));
50 #define PISP_CDAF_STATS_SIZE 8
51 #define PISP_CDAF_STATS_NUM_FOMS (PISP_CDAF_STATS_SIZE * PISP_CDAF_STATS_SIZE)
53 struct pisp_cdaf_statistics {
54 __u64 foms[PISP_CDAF_STATS_NUM_FOMS];
55 __u64 floating[PISP_FLOATING_STATS_NUM_ZONES];
56 } __attribute__((packed));
58 struct pisp_statistics {
59 struct pisp_awb_statistics awb;
60 struct pisp_agc_statistics agc;
61 struct pisp_cdaf_statistics cdaf;
62 } __attribute__((packed));
64 #endif /* _UAPI_PISP_FE_STATISTICS_H_ */