1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
|
/*
* Copyright (c) 2018, NVIDIA CORPORATION. All rights reserved.
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
* DEALINGS IN THE SOFTWARE.
*/
#include <nvgpu/list.h>
#include <nvgpu/clk_arb.h>
/**
* Stub imlementation of the clk_arb code. Yikes. Much of this probably could be
* commonized if one were to think through the implementation but that is
* probably weeks of work at a minimum.
*
* So for POSIX it will be stubbed.
*/
int nvgpu_clk_arb_init_arbiter(struct gk20a *g)
{
return -ENOSYS;
}
int nvgpu_clk_arb_get_arbiter_clk_range(struct gk20a *g, u32 api_domain,
u16 *min_mhz, u16 *max_mhz)
{
return -ENOSYS;
}
int nvgpu_clk_arb_update_vf_table(struct nvgpu_clk_arb *arb)
{
return -ENOSYS;
}
int nvgpu_clk_arb_worker_init(struct gk20a *g)
{
return -ENOSYS;
}
bool nvgpu_clk_arb_has_active_req(struct gk20a *g)
{
return false;
}
int nvgpu_clk_arb_get_arbiter_actual_mhz(struct gk20a *g,
u32 api_domain, u16 *actual_mhz)
{
return -ENOSYS;
}
int nvgpu_clk_arb_get_arbiter_effective_mhz(struct gk20a *g,
u32 api_domain, u16 *effective_mhz)
{
return -ENOSYS;
}
int nvgpu_clk_arb_get_arbiter_clk_f_points(struct gk20a *g,
u32 api_domain,
u32 *max_points, u16 *fpoints)
{
return -ENOSYS;
}
u32 nvgpu_clk_arb_get_arbiter_clk_domains(struct gk20a *g)
{
return 0;
}
bool nvgpu_clk_arb_is_valid_domain(struct gk20a *g, u32 api_domain)
{
return false;
}
void nvgpu_clk_arb_cleanup_arbiter(struct gk20a *g)
{
}
int nvgpu_clk_arb_install_session_fd(struct gk20a *g,
struct nvgpu_clk_session *session)
{
return -ENOSYS;
}
int nvgpu_clk_arb_init_session(struct gk20a *g,
struct nvgpu_clk_session **_session)
{
return -ENOSYS;
}
void nvgpu_clk_arb_release_session(struct gk20a *g,
struct nvgpu_clk_session *session)
{
}
int nvgpu_clk_arb_commit_request_fd(struct gk20a *g,
struct nvgpu_clk_session *session,
int request_fd)
{
return -ENOSYS;
}
int nvgpu_clk_arb_set_session_target_mhz(struct nvgpu_clk_session *session,
int fd, u32 api_domain, u16 target_mhz)
{
return -ENOSYS;
}
int nvgpu_clk_arb_get_session_target_mhz(struct nvgpu_clk_session *session,
u32 api_domain, u16 *target_mhz)
{
return -ENOSYS;
}
int nvgpu_clk_arb_install_event_fd(struct gk20a *g,
struct nvgpu_clk_session *session,
int *event_fd, u32 alarm_mask)
{
return -ENOSYS;
}
int nvgpu_clk_arb_install_request_fd(struct gk20a *g,
struct nvgpu_clk_session *session,
int *event_fd)
{
return -ENOSYS;
}
u32 nvgpu_clk_arb_notify(struct nvgpu_clk_dev *dev,
struct nvgpu_clk_arb_target *target,
u32 alarm)
{
return 0;
}
void nvgpu_clk_arb_free_fd(struct nvgpu_ref *refcount)
{
}
void nvgpu_clk_arb_schedule_vf_table_update(struct gk20a *g)
{
}
int nvgpu_clk_arb_get_current_pstate(struct gk20a *g)
{
return -ENOSYS;
}
void nvgpu_clk_arb_pstate_change_lock(struct gk20a *g, bool lock)
{
}
void nvgpu_clk_arb_send_thermal_alarm(struct gk20a *g)
{
}
void nvgpu_clk_arb_schedule_alarm(struct gk20a *g, u32 alarm)
{
}
void nvgpu_clk_arb_set_global_alarm(struct gk20a *g, u32 alarm)
{
}
void nvgpu_clk_arb_clear_global_alarm(struct gk20a *g, u32 alarm)
{
}
void nvgpu_clk_arb_event_post_event(struct nvgpu_clk_dev *dev)
{
}
void nvgpu_clk_arb_worker_enqueue(struct gk20a *g,
struct nvgpu_clk_arb_work_item *work_item)
{
}
int nvgpu_clk_notification_queue_alloc(struct gk20a *g,
struct nvgpu_clk_notification_queue *queue,
size_t events_number)
{
return -ENOSYS;
}
|