xref: /linux/drivers/gpu/drm/etnaviv/etnaviv_perfmon.h (revision 48dea9a700c8728cc31a1dd44588b97578de86ee)
1 /* SPDX-License-Identifier: GPL-2.0 */
2 /*
3  * Copyright (C) 2017 Etnaviv Project
4  * Copyright (C) 2017 Zodiac Inflight Innovations
5  */
6 
7 #ifndef __ETNAVIV_PERFMON_H__
8 #define __ETNAVIV_PERFMON_H__
9 
10 struct etnaviv_gpu;
11 struct drm_etnaviv_pm_domain;
12 struct drm_etnaviv_pm_signal;
13 
14 struct etnaviv_perfmon_request
15 {
16 	u32 flags;
17 	u8 domain;
18 	u8 signal;
19 	u32 sequence;
20 
21 	/* bo to store a value */
22 	u32 *bo_vma;
23 	u32 offset;
24 };
25 
26 int etnaviv_pm_query_dom(struct etnaviv_gpu *gpu,
27 	struct drm_etnaviv_pm_domain *domain);
28 
29 int etnaviv_pm_query_sig(struct etnaviv_gpu *gpu,
30 	struct drm_etnaviv_pm_signal *signal);
31 
32 int etnaviv_pm_req_validate(const struct drm_etnaviv_gem_submit_pmr *r,
33 	u32 exec_state);
34 
35 void etnaviv_perfmon_process(struct etnaviv_gpu *gpu,
36 	const struct etnaviv_perfmon_request *pmr, u32 exec_state);
37 
38 #endif /* __ETNAVIV_PERFMON_H__ */
39