Back to home page

OSCL-LXR

 
 

    


0001 /*
0002  * Copyright 2016 Advanced Micro Devices, Inc.
0003  *
0004  * Permission is hereby granted, free of charge, to any person obtaining a
0005  * copy of this software and associated documentation files (the "Software"),
0006  * to deal in the Software without restriction, including without limitation
0007  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
0008  * and/or sell copies of the Software, and to permit persons to whom the
0009  * Software is furnished to do so, subject to the following conditions:
0010  *
0011  * The above copyright notice and this permission notice shall be included in
0012  * all copies or substantial portions of the Software.
0013  *
0014  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
0015  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
0016  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
0017  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
0018  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
0019  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
0020  * OTHER DEALINGS IN THE SOFTWARE.
0021  *
0022  * Authors: AMD
0023  *
0024  */
0025 
0026 #ifndef MODULES_INC_MOD_STATS_H_
0027 #define MODULES_INC_MOD_STATS_H_
0028 
0029 #include "dm_services.h"
0030 
0031 struct mod_stats {
0032     int dummy;
0033 };
0034 
0035 struct mod_stats_caps {
0036     bool dummy;
0037 };
0038 
0039 struct mod_stats_init_params {
0040     unsigned int stats_enable;
0041     unsigned int stats_entries;
0042 };
0043 
0044 struct mod_stats *mod_stats_create(struct dc *dc,
0045         struct mod_stats_init_params *init_params);
0046 
0047 void mod_stats_destroy(struct mod_stats *mod_stats);
0048 
0049 bool mod_stats_init(struct mod_stats *mod_stats);
0050 
0051 void mod_stats_dump(struct mod_stats *mod_stats);
0052 
0053 void mod_stats_reset_data(struct mod_stats *mod_stats);
0054 
0055 void mod_stats_update_event(struct mod_stats *mod_stats,
0056         char *event_string,
0057         unsigned int length);
0058 
0059 void mod_stats_update_flip(struct mod_stats *mod_stats,
0060         unsigned long timestamp_in_ns);
0061 
0062 void mod_stats_update_vupdate(struct mod_stats *mod_stats,
0063         unsigned long timestamp_in_ns);
0064 
0065 void mod_stats_update_freesync(struct mod_stats *mod_stats,
0066         unsigned int v_total_min,
0067         unsigned int v_total_max,
0068         unsigned int event_triggers,
0069         unsigned int window_min,
0070         unsigned int window_max,
0071         unsigned int lfc_mid_point_in_us,
0072         unsigned int inserted_frames,
0073         unsigned int inserted_frame_duration_in_us);
0074 
0075 #endif /* MODULES_INC_MOD_STATS_H_ */