1/* SPDX-License-Identifier: GPL-2.0 */
2/*
3 * Support for Intel Camera Imaging ISP subsystem.
4 * Copyright (c) 2015, Intel Corporation.
5 *
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
9 *
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
13 * more details.
14 */
15
16#ifndef __IA_CSS_DP_TYPES_H
17#define __IA_CSS_DP_TYPES_H
18
19/* @file
20* CSS-API header file for Defect Pixel Correction (DPC) parameters.
21*/
22
23/* Defect Pixel Correction configuration.
24 *
25 *  ISP block: DPC1 (DPC after WB)
26 *             DPC2 (DPC before WB)
27 *  ISP1: DPC1 is used.
28 *  ISP2: DPC2 is used.
29 */
30struct ia_css_dp_config {
31	ia_css_u0_16 threshold; /** The threshold of defect pixel correction,
32			      representing the permissible difference of
33			      intensity between one pixel and its
34			      surrounding pixels. Smaller values result
35				in more frequent pixel corrections.
36				u0.16, [0,65535],
37				default 8192, ineffective 65535 */
38	ia_css_u8_8 gain;	 /** The sensitivity of mis-correction. ISP will
39			      miss a lot of defects if the value is set
40				too large.
41				u8.8, [0,65535],
42				default 4096, ineffective 65535 */
43	u32 gr;	/* unsigned <integer_bits>.<16-integer_bits> */
44	u32 r;	/* unsigned <integer_bits>.<16-integer_bits> */
45	u32 b;	/* unsigned <integer_bits>.<16-integer_bits> */
46	u32 gb;	/* unsigned <integer_bits>.<16-integer_bits> */
47};
48
49#endif /* __IA_CSS_DP_TYPES_H */
50