blob: 9ea21d2a09e42ac596f5594a0f64b28d3576d077 [file] [log] [blame]
Christopher Ferris05d08e92016-02-04 13:16:38 -08001/****************************************************************************
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 {
Christopher Ferris05d08e92016-02-04 13:16:38 -080023 VPFE_CCDC_DATA_16BITS = 0,
24 VPFE_CCDC_DATA_15BITS,
25 VPFE_CCDC_DATA_14BITS,
26 VPFE_CCDC_DATA_13BITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080027 VPFE_CCDC_DATA_12BITS,
28 VPFE_CCDC_DATA_11BITS,
29 VPFE_CCDC_DATA_10BITS,
30 VPFE_CCDC_DATA_8BITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080031};
32enum vpfe_ccdc_sample_length {
33 VPFE_CCDC_SAMPLE_1PIXELS = 0,
34 VPFE_CCDC_SAMPLE_2PIXELS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 VPFE_CCDC_SAMPLE_4PIXELS,
36 VPFE_CCDC_SAMPLE_8PIXELS,
37 VPFE_CCDC_SAMPLE_16PIXELS,
38};
Christopher Ferris05d08e92016-02-04 13:16:38 -080039enum vpfe_ccdc_sample_line {
40 VPFE_CCDC_SAMPLE_1LINES = 0,
41 VPFE_CCDC_SAMPLE_2LINES,
42 VPFE_CCDC_SAMPLE_4LINES,
Christopher Ferris05d08e92016-02-04 13:16:38 -080043 VPFE_CCDC_SAMPLE_8LINES,
44 VPFE_CCDC_SAMPLE_16LINES,
45};
46enum vpfe_ccdc_gamma_width {
Christopher Ferris05d08e92016-02-04 13:16:38 -080047 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,
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 VPFE_CCDC_GAMMA_BITS_11_2,
52 VPFE_CCDC_GAMMA_BITS_10_1,
53 VPFE_CCDC_GAMMA_BITS_09_0,
54};
Christopher Ferris05d08e92016-02-04 13:16:38 -080055struct vpfe_ccdc_a_law {
56 unsigned char enable;
57 enum vpfe_ccdc_gamma_width gamma_wd;
58};
Christopher Ferris05d08e92016-02-04 13:16:38 -080059struct vpfe_ccdc_black_clamp {
60 unsigned char enable;
61 enum vpfe_ccdc_sample_length sample_pixel;
62 enum vpfe_ccdc_sample_line sample_ln;
Christopher Ferris05d08e92016-02-04 13:16:38 -080063 unsigned short start_pixel;
64 unsigned short sgain;
65 unsigned short dc_sub;
66};
Christopher Ferris05d08e92016-02-04 13:16:38 -080067struct vpfe_ccdc_black_compensation {
68 char r;
69 char gr;
70 char b;
Christopher Ferris05d08e92016-02-04 13:16:38 -080071 char gb;
72};
73struct vpfe_ccdc_config_params_raw {
74 enum vpfe_ccdc_data_size data_sz;
Christopher Ferris05d08e92016-02-04 13:16:38 -080075 struct vpfe_ccdc_a_law alaw;
76 struct vpfe_ccdc_black_clamp blk_clamp;
77 struct vpfe_ccdc_black_compensation blk_comp;
78};
Christopher Ferris05d08e92016-02-04 13:16:38 -080079#define VIDIOC_AM437X_CCDC_CFG _IOW('V', BASE_VIDIOC_PRIVATE + 1, void *)
80#endif