1 /* SPDX-License-Identifier: GPL-2.0 */ 2 /** 3 Support for Intel Camera Imaging ISP subsystem. 4 Copyright (c) 2010 - 2015, Intel Corporation. 5 6 */ 7 8 #ifndef _IA_CSS_ISP_PARAM_TYPES_H_ 9 #define _IA_CSS_ISP_PARAM_TYPES_H_ 10 11 #include "ia_css_types.h" 12 #include <platform_support.h> 13 #include <system_global.h> 14 15 /* Short hands */ 16 #define IA_CSS_ISP_DMEM IA_CSS_ISP_DMEM0 17 #define IA_CSS_ISP_VMEM IA_CSS_ISP_VMEM0 18 19 /* The driver depends on this, to be removed later. */ 20 #define IA_CSS_NUM_ISP_MEMORIES IA_CSS_NUM_MEMORIES 21 22 /* Explicit member numbering to avoid fish type checker bug */ 23 enum ia_css_param_class { 24 IA_CSS_PARAM_CLASS_PARAM = 0, /* Late binding parameters, like 3A */ 25 IA_CSS_PARAM_CLASS_CONFIG = 1, /* Pipe config time parameters, like resolution */ 26 IA_CSS_PARAM_CLASS_STATE = 2, /* State parameters, like tnr buffer index */ 27 #if 0 /* Not yet implemented */ 28 IA_CSS_PARAM_CLASS_FRAME = 3, /* Frame time parameters, like output buffer */ 29 #endif 30 }; 31 32 #define IA_CSS_NUM_PARAM_CLASSES (IA_CSS_PARAM_CLASS_STATE + 1) 33 34 /* ISP parameter descriptor */ 35 struct ia_css_isp_parameter { 36 u32 offset; /* Offset in isp_<mem>)parameters, etc. */ 37 u32 size; /* Disabled if 0 */ 38 }; 39 40 /* Address/size of each parameter class in each isp memory, host memory pointers */ 41 struct ia_css_isp_param_host_segments { 42 struct ia_css_host_data params[IA_CSS_NUM_PARAM_CLASSES][IA_CSS_NUM_MEMORIES]; 43 }; 44 45 /* Address/size of each parameter class in each isp memory, css memory pointers */ 46 struct ia_css_isp_param_css_segments { 47 struct ia_css_data params[IA_CSS_NUM_PARAM_CLASSES][IA_CSS_NUM_MEMORIES]; 48 }; 49 50 /* Address/size of each parameter class in each isp memory, isp memory pointers */ 51 struct ia_css_isp_param_isp_segments { 52 struct ia_css_isp_data params[IA_CSS_NUM_PARAM_CLASSES][IA_CSS_NUM_MEMORIES]; 53 }; 54 55 /* Memory offsets in binary info */ 56 struct ia_css_isp_param_memory_offsets { 57 u32 offsets[IA_CSS_NUM_PARAM_CLASSES]; /** offset wrt hdr in bytes */ 58 }; 59 60 /* Offsets for ISP kernel parameters per isp memory. 61 * Only relevant for standard ISP binaries, not ACC or SP. 62 */ 63 union ia_css_all_memory_offsets { 64 struct { 65 CSS_ALIGN(struct ia_css_memory_offsets *param, 8); 66 CSS_ALIGN(struct ia_css_config_memory_offsets *config, 8); 67 CSS_ALIGN(struct ia_css_state_memory_offsets *state, 8); 68 } offsets; 69 struct { 70 CSS_ALIGN(void *ptr, 8); 71 } array[IA_CSS_NUM_PARAM_CLASSES]; 72 }; 73 74 #endif /* _IA_CSS_ISP_PARAM_TYPES_H_ */ 75