1/*	$NetBSD: mod_stats.h,v 1.2 2021/12/18 23:45:07 riastradh Exp $	*/
2
3/*
4 * Copyright 2016 Advanced Micro Devices, Inc.
5 *
6 * Permission is hereby granted, free of charge, to any person obtaining a
7 * copy of this software and associated documentation files (the "Software"),
8 * to deal in the Software without restriction, including without limitation
9 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
10 * and/or sell copies of the Software, and to permit persons to whom the
11 * Software is furnished to do so, subject to the following conditions:
12 *
13 * The above copyright notice and this permission notice shall be included in
14 * all copies or substantial portions of the Software.
15 *
16 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
19 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
20 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
21 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22 * OTHER DEALINGS IN THE SOFTWARE.
23 *
24 * Authors: AMD
25 *
26 */
27
28#ifndef MODULES_INC_MOD_STATS_H_
29#define MODULES_INC_MOD_STATS_H_
30
31#include "dm_services.h"
32
33struct mod_stats {
34	int dummy;
35};
36
37struct mod_stats_caps {
38	bool dummy;
39};
40
41struct mod_stats *mod_stats_create(struct dc *dc);
42
43void mod_stats_destroy(struct mod_stats *mod_stats);
44
45bool mod_stats_init(struct mod_stats *mod_stats);
46
47void mod_stats_dump(struct mod_stats *mod_stats);
48
49void mod_stats_reset_data(struct mod_stats *mod_stats);
50
51void mod_stats_update_event(struct mod_stats *mod_stats,
52		char *event_string,
53		unsigned int length);
54
55void mod_stats_update_flip(struct mod_stats *mod_stats,
56		unsigned long timestamp_in_ns);
57
58void mod_stats_update_vupdate(struct mod_stats *mod_stats,
59		unsigned long timestamp_in_ns);
60
61void mod_stats_update_freesync(struct mod_stats *mod_stats,
62		unsigned int v_total_min,
63		unsigned int v_total_max,
64		unsigned int event_triggers,
65		unsigned int window_min,
66		unsigned int window_max,
67		unsigned int lfc_mid_point_in_us,
68		unsigned int inserted_frames,
69		unsigned int inserted_frame_duration_in_us);
70
71#endif /* MODULES_INC_MOD_STATS_H_ */
72