1/****************************************************************************
2 ****************************************************************************
3 ***
4 ***   This header was automatically generated from a Linux kernel header
5 ***   of the same name, to make information necessary for userspace to
6 ***   call into the kernel available to libc.  It contains only constants,
7 ***   structures, and macros generated from the original header, and thus,
8 ***   contains no copyrightable information.
9 ***
10 ***   To edit the content of this header, modify the corresponding
11 ***   source file (e.g. under external/kernel-headers/original/) then
12 ***   run bionic/libc/kernel/tools/update_all.py
13 ***
14 ***   Any manual change here will be lost the next time this script will
15 ***   be run. You've been warned!
16 ***
17 ****************************************************************************
18 ****************************************************************************/
19#ifndef AM437X_VPFE_USER_H
20#define AM437X_VPFE_USER_H
21#include <linux/videodev2.h>
22enum vpfe_ccdc_data_size {
23  VPFE_CCDC_DATA_16BITS = 0,
24  VPFE_CCDC_DATA_15BITS,
25  VPFE_CCDC_DATA_14BITS,
26  VPFE_CCDC_DATA_13BITS,
27  VPFE_CCDC_DATA_12BITS,
28  VPFE_CCDC_DATA_11BITS,
29  VPFE_CCDC_DATA_10BITS,
30  VPFE_CCDC_DATA_8BITS,
31};
32enum vpfe_ccdc_sample_length {
33  VPFE_CCDC_SAMPLE_1PIXELS = 0,
34  VPFE_CCDC_SAMPLE_2PIXELS,
35  VPFE_CCDC_SAMPLE_4PIXELS,
36  VPFE_CCDC_SAMPLE_8PIXELS,
37  VPFE_CCDC_SAMPLE_16PIXELS,
38};
39enum vpfe_ccdc_sample_line {
40  VPFE_CCDC_SAMPLE_1LINES = 0,
41  VPFE_CCDC_SAMPLE_2LINES,
42  VPFE_CCDC_SAMPLE_4LINES,
43  VPFE_CCDC_SAMPLE_8LINES,
44  VPFE_CCDC_SAMPLE_16LINES,
45};
46enum vpfe_ccdc_gamma_width {
47  VPFE_CCDC_GAMMA_BITS_15_6 = 0,
48  VPFE_CCDC_GAMMA_BITS_14_5,
49  VPFE_CCDC_GAMMA_BITS_13_4,
50  VPFE_CCDC_GAMMA_BITS_12_3,
51  VPFE_CCDC_GAMMA_BITS_11_2,
52  VPFE_CCDC_GAMMA_BITS_10_1,
53  VPFE_CCDC_GAMMA_BITS_09_0,
54};
55struct vpfe_ccdc_a_law {
56  unsigned char enable;
57  enum vpfe_ccdc_gamma_width gamma_wd;
58};
59struct vpfe_ccdc_black_clamp {
60  unsigned char enable;
61  enum vpfe_ccdc_sample_length sample_pixel;
62  enum vpfe_ccdc_sample_line sample_ln;
63  unsigned short start_pixel;
64  unsigned short sgain;
65  unsigned short dc_sub;
66};
67struct vpfe_ccdc_black_compensation {
68  char r;
69  char gr;
70  char b;
71  char gb;
72};
73struct vpfe_ccdc_config_params_raw {
74  enum vpfe_ccdc_data_size data_sz;
75  struct vpfe_ccdc_a_law alaw;
76  struct vpfe_ccdc_black_clamp blk_clamp;
77  struct vpfe_ccdc_black_compensation blk_comp;
78};
79#define VIDIOC_AM437X_CCDC_CFG _IOW('V', BASE_VIDIOC_PRIVATE + 1, void *)
80#endif
81