1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /* 3 * Support for Intel Camera Imaging ISP subsystem. 4 * Copyright (c) 2015, Intel Corporation. 5 */ 6 7 #ifndef __IA_CSS_DPC2_PARAM_H 8 #define __IA_CSS_DPC2_PARAM_H 9 10 #include <linux/math.h> 11 12 #include "type_support.h" 13 #include "vmem.h" /* for VMEM_ARRAY*/ 14 15 /* 4 planes : GR, R, B, GB */ 16 #define NUM_PLANES 4 17 18 /* ToDo: Move this to testsetup */ 19 #define MAX_FRAME_SIMDWIDTH 30 20 21 /* 3 lines state per color plane input_line_state */ 22 #define DPC2_STATE_INPUT_BUFFER_HEIGHT (3 * NUM_PLANES) 23 /* Each plane has width equal to half frame line */ 24 #define DPC2_STATE_INPUT_BUFFER_WIDTH DIV_ROUND_UP(MAX_FRAME_SIMDWIDTH, 2) 25 26 /* 1 line state per color plane for local deviation state*/ 27 #define DPC2_STATE_LOCAL_DEVIATION_BUFFER_HEIGHT (1 * NUM_PLANES) 28 /* Each plane has width equal to half frame line */ 29 #define DPC2_STATE_LOCAL_DEVIATION_BUFFER_WIDTH DIV_ROUND_UP(MAX_FRAME_SIMDWIDTH, 2) 30 31 /* MINMAX state buffer stores 1 full input line (GR-R color line) */ 32 #define DPC2_STATE_SECOND_MINMAX_BUFFER_HEIGHT 1 33 #define DPC2_STATE_SECOND_MINMAX_BUFFER_WIDTH MAX_FRAME_SIMDWIDTH 34 35 struct ia_css_isp_dpc2_params { 36 s32 metric1; 37 s32 metric2; 38 s32 metric3; 39 s32 wb_gain_gr; 40 s32 wb_gain_r; 41 s32 wb_gain_b; 42 s32 wb_gain_gb; 43 }; 44 45 #endif /* __IA_CSS_DPC2_PARAM_H */ 46