13cbcbe01SMaíra Canal /* SPDX-License-Identifier: GPL-2.0+ */ 23cbcbe01SMaíra Canal /* 33cbcbe01SMaíra Canal * Copyright (C) 2024 Raspberry Pi 43cbcbe01SMaíra Canal */ 53cbcbe01SMaíra Canal #ifndef V3D_PERFORMANCE_COUNTERS_H 63cbcbe01SMaíra Canal #define V3D_PERFORMANCE_COUNTERS_H 73cbcbe01SMaíra Canal 83cbcbe01SMaíra Canal /* Holds a description of a given performance counter. The index of performance 93cbcbe01SMaíra Canal * counter is given by the array on v3d_performance_counter.h 103cbcbe01SMaíra Canal */ 113cbcbe01SMaíra Canal struct v3d_perf_counter_desc { 123cbcbe01SMaíra Canal /* Category of the counter */ 133cbcbe01SMaíra Canal char category[32]; 143cbcbe01SMaíra Canal 153cbcbe01SMaíra Canal /* Name of the counter */ 163cbcbe01SMaíra Canal char name[64]; 173cbcbe01SMaíra Canal 183cbcbe01SMaíra Canal /* Description of the counter */ 193cbcbe01SMaíra Canal char description[256]; 203cbcbe01SMaíra Canal }; 213cbcbe01SMaíra Canal 22*3ef80d4eSTvrtko Ursulin struct v3d_perfmon_info { 23*3ef80d4eSTvrtko Ursulin /* 24*3ef80d4eSTvrtko Ursulin * Different revisions of V3D have different total number of 25*3ef80d4eSTvrtko Ursulin * performance counters. 26*3ef80d4eSTvrtko Ursulin */ 27*3ef80d4eSTvrtko Ursulin unsigned int max_counters; 283cbcbe01SMaíra Canal 29*3ef80d4eSTvrtko Ursulin /* 30*3ef80d4eSTvrtko Ursulin * Array of counters valid for the platform. 31*3ef80d4eSTvrtko Ursulin */ 32*3ef80d4eSTvrtko Ursulin const struct v3d_perf_counter_desc *counters; 33*3ef80d4eSTvrtko Ursulin }; 343cbcbe01SMaíra Canal 353cbcbe01SMaíra Canal #endif 36