1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux 1 2 /* 3 * Copyright (C) 2013 - 2014 Texas Instruments 4 * 5 * Benoit Parrot <bparrot@ti.com> 6 * Lad, Prabhakar <prabhakar.csengg@gmail.com> 7 * 8 * This program is free software; you may redi 9 * it under the terms of the GNU General Publi 10 * the Free Software Foundation; version 2 of 11 * 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT W 13 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMIT 14 * MERCHANTABILITY, FITNESS FOR A PARTICULAR P 15 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTH 16 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER L 17 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARIS 18 * CONNECTION WITH THE SOFTWARE OR THE USE OR 19 * SOFTWARE. 20 */ 21 22 #ifndef AM437X_VPFE_USER_H 23 #define AM437X_VPFE_USER_H 24 25 #include <linux/videodev2.h> 26 27 enum vpfe_ccdc_data_size { 28 VPFE_CCDC_DATA_16BITS = 0, 29 VPFE_CCDC_DATA_15BITS, 30 VPFE_CCDC_DATA_14BITS, 31 VPFE_CCDC_DATA_13BITS, 32 VPFE_CCDC_DATA_12BITS, 33 VPFE_CCDC_DATA_11BITS, 34 VPFE_CCDC_DATA_10BITS, 35 VPFE_CCDC_DATA_8BITS, 36 }; 37 38 /* enum for No of pixel per line to be avg. in 39 enum vpfe_ccdc_sample_length { 40 VPFE_CCDC_SAMPLE_1PIXELS = 0, 41 VPFE_CCDC_SAMPLE_2PIXELS, 42 VPFE_CCDC_SAMPLE_4PIXELS, 43 VPFE_CCDC_SAMPLE_8PIXELS, 44 VPFE_CCDC_SAMPLE_16PIXELS, 45 }; 46 47 /* enum for No of lines in Black Clamping */ 48 enum vpfe_ccdc_sample_line { 49 VPFE_CCDC_SAMPLE_1LINES = 0, 50 VPFE_CCDC_SAMPLE_2LINES, 51 VPFE_CCDC_SAMPLE_4LINES, 52 VPFE_CCDC_SAMPLE_8LINES, 53 VPFE_CCDC_SAMPLE_16LINES, 54 }; 55 56 /* enum for Alaw gamma width */ 57 enum vpfe_ccdc_gamma_width { 58 VPFE_CCDC_GAMMA_BITS_15_6 = 0, /* use 59 VPFE_CCDC_GAMMA_BITS_14_5, 60 VPFE_CCDC_GAMMA_BITS_13_4, 61 VPFE_CCDC_GAMMA_BITS_12_3, 62 VPFE_CCDC_GAMMA_BITS_11_2, 63 VPFE_CCDC_GAMMA_BITS_10_1, 64 VPFE_CCDC_GAMMA_BITS_09_0, /* use 65 }; 66 67 /* structure for ALaw */ 68 struct vpfe_ccdc_a_law { 69 /* Enable/disable A-Law */ 70 unsigned char enable; 71 /* Gamma Width Input */ 72 enum vpfe_ccdc_gamma_width gamma_wd; 73 }; 74 75 /* structure for Black Clamping */ 76 struct vpfe_ccdc_black_clamp { 77 unsigned char enable; 78 /* only if bClampEnable is TRUE */ 79 enum vpfe_ccdc_sample_length sample_pi 80 /* only if bClampEnable is TRUE */ 81 enum vpfe_ccdc_sample_line sample_ln; 82 /* only if bClampEnable is TRUE */ 83 unsigned short start_pixel; 84 /* only if bClampEnable is TRUE */ 85 unsigned short sgain; 86 /* only if bClampEnable is FALSE */ 87 unsigned short dc_sub; 88 }; 89 90 /* structure for Black Level Compensation */ 91 struct vpfe_ccdc_black_compensation { 92 /* Constant value to subtract from Red 93 char r; 94 /* Constant value to subtract from Gr 95 char gr; 96 /* Constant value to subtract from Blu 97 char b; 98 /* Constant value to subtract from Gb 99 char gb; 100 }; 101 102 /* Structure for CCDC configuration parameters 103 * by application 104 */ 105 struct vpfe_ccdc_config_params_raw { 106 /* data size value from 8 to 16 bits * 107 enum vpfe_ccdc_data_size data_sz; 108 /* Structure for Optional A-Law */ 109 struct vpfe_ccdc_a_law alaw; 110 /* Structure for Optical Black Clamp * 111 struct vpfe_ccdc_black_clamp blk_clamp 112 /* Structure for Black Compensation */ 113 struct vpfe_ccdc_black_compensation bl 114 }; 115 116 /* 117 * Private IOCTL 118 * VIDIOC_AM437X_CCDC_CFG - Set CCDC configura 119 * This is an experimental ioctl that will cha 120 * this ioctl with care ! 121 **/ 122 #define VIDIOC_AM437X_CCDC_CFG \ 123 _IOW('V', BASE_VIDIOC_PRIVATE + 1, voi 124 125 #endif /* AM437X_VPFE_USER_H */ 126
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.