19e2c2e27SChristian Gmeiner /* 29e2c2e27SChristian Gmeiner * Copyright (C) 2017 Etnaviv Project 39e2c2e27SChristian Gmeiner * Copyright (C) 2017 Zodiac Inflight Innovations 49e2c2e27SChristian Gmeiner * 59e2c2e27SChristian Gmeiner * This program is free software; you can redistribute it and/or modify it 69e2c2e27SChristian Gmeiner * under the terms of the GNU General Public License version 2 as published by 79e2c2e27SChristian Gmeiner * the Free Software Foundation. 89e2c2e27SChristian Gmeiner * 99e2c2e27SChristian Gmeiner * This program is distributed in the hope that it will be useful, but WITHOUT 109e2c2e27SChristian Gmeiner * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 119e2c2e27SChristian Gmeiner * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 129e2c2e27SChristian Gmeiner * more details. 139e2c2e27SChristian Gmeiner * 149e2c2e27SChristian Gmeiner * You should have received a copy of the GNU General Public License along with 159e2c2e27SChristian Gmeiner * this program. If not, see <http://www.gnu.org/licenses/>. 169e2c2e27SChristian Gmeiner */ 179e2c2e27SChristian Gmeiner 189e2c2e27SChristian Gmeiner #ifndef __ETNAVIV_PERFMON_H__ 199e2c2e27SChristian Gmeiner #define __ETNAVIV_PERFMON_H__ 209e2c2e27SChristian Gmeiner 219e2c2e27SChristian Gmeiner struct etnaviv_gpu; 229e2c2e27SChristian Gmeiner struct drm_etnaviv_pm_domain; 239e2c2e27SChristian Gmeiner struct drm_etnaviv_pm_signal; 249e2c2e27SChristian Gmeiner 258d3d56ceSChristian Gmeiner struct etnaviv_perfmon_request 268d3d56ceSChristian Gmeiner { 278d3d56ceSChristian Gmeiner u32 flags; 288d3d56ceSChristian Gmeiner u8 domain; 298d3d56ceSChristian Gmeiner u8 signal; 308d3d56ceSChristian Gmeiner u32 sequence; 318d3d56ceSChristian Gmeiner 328d3d56ceSChristian Gmeiner /* bo to store a value */ 338d3d56ceSChristian Gmeiner u32 *bo_vma; 348d3d56ceSChristian Gmeiner u32 offset; 358d3d56ceSChristian Gmeiner }; 368d3d56ceSChristian Gmeiner 379e2c2e27SChristian Gmeiner int etnaviv_pm_query_dom(struct etnaviv_gpu *gpu, 389e2c2e27SChristian Gmeiner struct drm_etnaviv_pm_domain *domain); 399e2c2e27SChristian Gmeiner 409e2c2e27SChristian Gmeiner int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu, 419e2c2e27SChristian Gmeiner struct drm_etnaviv_pm_signal *signal); 429e2c2e27SChristian Gmeiner 43*46df52cdSChristian Gmeiner int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr *r, 44*46df52cdSChristian Gmeiner u32 exec_state); 45*46df52cdSChristian Gmeiner 469e2c2e27SChristian Gmeiner #endif /* __ETNAVIV_PERFMON_H__ */ 47