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