diff options
Diffstat (limited to 'drivers/gpu/nvgpu/clk/clk_arb.h')
-rw-r--r-- | drivers/gpu/nvgpu/clk/clk_arb.h | 71 |
1 files changed, 71 insertions, 0 deletions
diff --git a/drivers/gpu/nvgpu/clk/clk_arb.h b/drivers/gpu/nvgpu/clk/clk_arb.h new file mode 100644 index 00000000..700804b3 --- /dev/null +++ b/drivers/gpu/nvgpu/clk/clk_arb.h | |||
@@ -0,0 +1,71 @@ | |||
1 | /* | ||
2 | * Copyright (c) 2016, NVIDIA CORPORATION. All rights reserved. | ||
3 | * | ||
4 | * This program is free software; you can redistribute it and/or modify it | ||
5 | * under the terms and conditions of the GNU General Public License, | ||
6 | * version 2, as published by the Free Software Foundation. | ||
7 | * | ||
8 | * This program is distributed in the hope it will be useful, but WITHOUT | ||
9 | * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | ||
10 | * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for | ||
11 | * more details. | ||
12 | */ | ||
13 | |||
14 | #include "gk20a/gk20a.h" | ||
15 | |||
16 | #ifndef _CLK_ARB_H_ | ||
17 | #define _CLK_ARB_H_ | ||
18 | |||
19 | struct nvgpu_clk_arb; | ||
20 | struct nvgpu_clk_session; | ||
21 | |||
22 | int nvgpu_clk_arb_init_arbiter(struct gk20a *g); | ||
23 | |||
24 | int nvgpu_clk_arb_get_arbiter_clk_range(struct gk20a *g, u32 api_domain, | ||
25 | u16 *min_mhz, u16 *max_mhz); | ||
26 | |||
27 | int nvgpu_clk_arb_get_arbiter_actual_mhz(struct gk20a *g, | ||
28 | u32 api_domain, u16 *actual_mhz); | ||
29 | |||
30 | int nvgpu_clk_arb_get_arbiter_effective_mhz(struct gk20a *g, | ||
31 | u32 api_domain, u16 *effective_mhz); | ||
32 | |||
33 | int nvgpu_clk_arb_get_arbiter_clk_f_points(struct gk20a *g, | ||
34 | u32 api_domain, u32 *max_points, u16 *fpoints); | ||
35 | |||
36 | u32 nvgpu_clk_arb_get_arbiter_clk_domains(struct gk20a *g); | ||
37 | |||
38 | void nvgpu_clk_arb_cleanup_arbiter(struct gk20a *g); | ||
39 | |||
40 | int nvgpu_clk_arb_install_session_fd(struct gk20a *g, | ||
41 | struct nvgpu_clk_session *session); | ||
42 | |||
43 | int nvgpu_clk_arb_init_session(struct gk20a *g, | ||
44 | struct nvgpu_clk_session **_session); | ||
45 | |||
46 | void nvgpu_clk_arb_release_session(struct gk20a *g, | ||
47 | struct nvgpu_clk_session *session); | ||
48 | |||
49 | int nvgpu_clk_arb_commit_request_fd(struct gk20a *g, | ||
50 | struct nvgpu_clk_session *session, int request_fd); | ||
51 | |||
52 | int nvgpu_clk_arb_set_session_target_mhz(struct nvgpu_clk_session *session, | ||
53 | int fd, u32 api_domain, u16 target_mhz); | ||
54 | |||
55 | int nvgpu_clk_arb_get_session_target_mhz(struct nvgpu_clk_session *session, | ||
56 | u32 api_domain, u16 *target_mhz); | ||
57 | |||
58 | int nvgpu_clk_arb_install_event_fd(struct gk20a *g, | ||
59 | struct nvgpu_clk_session *session, int *event_fd); | ||
60 | |||
61 | int nvgpu_clk_arb_install_request_fd(struct gk20a *g, | ||
62 | struct nvgpu_clk_session *session, int *event_fd); | ||
63 | |||
64 | void nvgpu_clk_arb_schedule_vf_table_update(struct gk20a *g); | ||
65 | |||
66 | int nvgpu_clk_arb_get_current_pstate(struct gk20a *g); | ||
67 | |||
68 | void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock); | ||
69 | |||
70 | #endif /* _CLK_ARB_H_ */ | ||
71 | |||