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 _SH_CSS_METRICS_H_ 8 #define _SH_CSS_METRICS_H_ 9 10 #include <type_support.h> 11 12 struct sh_css_pc_histogram { 13 unsigned int length; 14 unsigned int *run; 15 unsigned int *stall; 16 unsigned int *msink; 17 }; 18 19 struct sh_css_binary_metrics { 20 unsigned int mode; 21 unsigned int id; 22 struct sh_css_pc_histogram isp_histogram; 23 struct sh_css_pc_histogram sp_histogram; 24 struct sh_css_binary_metrics *next; 25 }; 26 27 struct ia_css_frame_metrics { 28 unsigned int num_frames; 29 }; 30 31 struct sh_css_metrics { 32 struct sh_css_binary_metrics *binary_metrics; 33 struct ia_css_frame_metrics frame_metrics; 34 }; 35 36 extern struct sh_css_metrics sh_css_metrics; 37 38 /* includes ia_css_binary.h, which depends on sh_css_metrics.h */ 39 #include "ia_css_types.h" 40 41 /* Sample ISP and SP pc and add to histogram */ 42 void sh_css_metrics_enable_pc_histogram(bool enable); 43 void sh_css_metrics_start_frame(void); 44 void sh_css_metrics_start_binary(struct sh_css_binary_metrics *metrics); 45 void sh_css_metrics_sample_pcs(void); 46 47 #endif /* _SH_CSS_METRICS_H_ */ 48