]> git.proxmox.com Git - mirror_ubuntu-hirsute-kernel.git/blob - drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/xnr/xnr_1.0/ia_css_xnr_types.h
Merge remote-tracking branches 'spi/fix/armada', 'spi/fix/atmel', 'spi/fix/doc',...
[mirror_ubuntu-hirsute-kernel.git] / drivers / staging / media / atomisp / pci / atomisp2 / css2400 / isp / kernels / xnr / xnr_1.0 / ia_css_xnr_types.h
1 /*
2 * Support for Intel Camera Imaging ISP subsystem.
3 * Copyright (c) 2015, Intel Corporation.
4 *
5 * This program is free software; you can redistribute it and/or modify it
6 * under the terms and conditions of the GNU General Public License,
7 * version 2, as published by the Free Software Foundation.
8 *
9 * This program is distributed in the hope it will be useful, but WITHOUT
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
12 * more details.
13 */
14
15 #ifndef __IA_CSS_XNR_TYPES_H
16 #define __IA_CSS_XNR_TYPES_H
17
18 /* @file
19 * CSS-API header file for Extra Noise Reduction (XNR) parameters.
20 */
21
22 /* XNR table.
23 *
24 * NOTE: The driver does not need to set this table,
25 * because the default values are set inside the css.
26 *
27 * This table contains coefficients used for division in XNR.
28 *
29 * u0.12, [0,4095],
30 * {4095, 2048, 1365, .........., 65, 64}
31 * ({1/1, 1/2, 1/3, ............., 1/63, 1/64})
32 *
33 * ISP block: XNR1
34 * ISP1: XNR1 is used.
35 * ISP2: XNR1 is used.
36 *
37 */
38
39 /* Number of elements in the xnr table. */
40 #define IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2 6
41 /* Number of elements in the xnr table. */
42 #define IA_CSS_VAMEM_1_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_1_XNR_TABLE_SIZE_LOG2)
43
44 /* Number of elements in the xnr table. */
45 #define IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2 6
46 /* Number of elements in the xnr table. */
47 #define IA_CSS_VAMEM_2_XNR_TABLE_SIZE (1U<<IA_CSS_VAMEM_2_XNR_TABLE_SIZE_LOG2)
48
49 /** IA_CSS_VAMEM_TYPE_1(ISP2300) or
50 IA_CSS_VAMEM_TYPE_2(ISP2400) */
51 union ia_css_xnr_data {
52 uint16_t vamem_1[IA_CSS_VAMEM_1_XNR_TABLE_SIZE];
53 /** Coefficients table on vamem type1. u0.12, [0,4095] */
54 uint16_t vamem_2[IA_CSS_VAMEM_2_XNR_TABLE_SIZE];
55 /** Coefficients table on vamem type2. u0.12, [0,4095] */
56 };
57
58 struct ia_css_xnr_table {
59 enum ia_css_vamem_type vamem_type;
60 union ia_css_xnr_data data;
61 };
62
63 struct ia_css_xnr_config {
64 /* XNR threshold.
65 * type:u0.16 valid range:[0,65535]
66 * default: 6400 */
67 uint16_t threshold;
68 };
69
70 #endif /* __IA_CSS_XNR_TYPES_H */
71