blob: a0607aa465d22bccb98724f8019aa883b8f15508 [file] [log] [blame]
Elliott Hughes180edef2023-11-02 00:08:05 +00001/*
2 * This file is auto-generated. Modifications will be lost.
3 *
4 * See https://android.googlesource.com/platform/bionic/+/master/libc/kernel/
5 * for more information.
6 */
Christopher Ferris05d08e92016-02-04 13:16:38 -08007#ifndef AM437X_VPFE_USER_H
8#define AM437X_VPFE_USER_H
9#include <linux/videodev2.h>
10enum vpfe_ccdc_data_size {
Christopher Ferris05d08e92016-02-04 13:16:38 -080011 VPFE_CCDC_DATA_16BITS = 0,
12 VPFE_CCDC_DATA_15BITS,
13 VPFE_CCDC_DATA_14BITS,
14 VPFE_CCDC_DATA_13BITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080015 VPFE_CCDC_DATA_12BITS,
16 VPFE_CCDC_DATA_11BITS,
17 VPFE_CCDC_DATA_10BITS,
18 VPFE_CCDC_DATA_8BITS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080019};
20enum vpfe_ccdc_sample_length {
21 VPFE_CCDC_SAMPLE_1PIXELS = 0,
22 VPFE_CCDC_SAMPLE_2PIXELS,
Christopher Ferris05d08e92016-02-04 13:16:38 -080023 VPFE_CCDC_SAMPLE_4PIXELS,
24 VPFE_CCDC_SAMPLE_8PIXELS,
25 VPFE_CCDC_SAMPLE_16PIXELS,
26};
Christopher Ferris05d08e92016-02-04 13:16:38 -080027enum vpfe_ccdc_sample_line {
28 VPFE_CCDC_SAMPLE_1LINES = 0,
29 VPFE_CCDC_SAMPLE_2LINES,
30 VPFE_CCDC_SAMPLE_4LINES,
Christopher Ferris05d08e92016-02-04 13:16:38 -080031 VPFE_CCDC_SAMPLE_8LINES,
32 VPFE_CCDC_SAMPLE_16LINES,
33};
34enum vpfe_ccdc_gamma_width {
Christopher Ferris05d08e92016-02-04 13:16:38 -080035 VPFE_CCDC_GAMMA_BITS_15_6 = 0,
36 VPFE_CCDC_GAMMA_BITS_14_5,
37 VPFE_CCDC_GAMMA_BITS_13_4,
38 VPFE_CCDC_GAMMA_BITS_12_3,
Christopher Ferris05d08e92016-02-04 13:16:38 -080039 VPFE_CCDC_GAMMA_BITS_11_2,
40 VPFE_CCDC_GAMMA_BITS_10_1,
41 VPFE_CCDC_GAMMA_BITS_09_0,
42};
Christopher Ferris05d08e92016-02-04 13:16:38 -080043struct vpfe_ccdc_a_law {
44 unsigned char enable;
45 enum vpfe_ccdc_gamma_width gamma_wd;
46};
Christopher Ferris05d08e92016-02-04 13:16:38 -080047struct vpfe_ccdc_black_clamp {
48 unsigned char enable;
49 enum vpfe_ccdc_sample_length sample_pixel;
50 enum vpfe_ccdc_sample_line sample_ln;
Christopher Ferris05d08e92016-02-04 13:16:38 -080051 unsigned short start_pixel;
52 unsigned short sgain;
53 unsigned short dc_sub;
54};
Christopher Ferris05d08e92016-02-04 13:16:38 -080055struct vpfe_ccdc_black_compensation {
56 char r;
57 char gr;
58 char b;
Christopher Ferris05d08e92016-02-04 13:16:38 -080059 char gb;
60};
61struct vpfe_ccdc_config_params_raw {
62 enum vpfe_ccdc_data_size data_sz;
Christopher Ferris05d08e92016-02-04 13:16:38 -080063 struct vpfe_ccdc_a_law alaw;
64 struct vpfe_ccdc_black_clamp blk_clamp;
65 struct vpfe_ccdc_black_compensation blk_comp;
66};
Christopher Ferris05d08e92016-02-04 13:16:38 -080067#define VIDIOC_AM437X_CCDC_CFG _IOW('V', BASE_VIDIOC_PRIVATE + 1, void *)
68#endif