add on the fly gpu volt table

This commit is contained in:
Lightos1
2026-07-04 18:18:51 +02:00
parent cb0ffbcd29
commit 7766481ff6
10 changed files with 351 additions and 205 deletions

View File

@@ -141,6 +141,11 @@ namespace ipcService {
return 0;
}
Result RequestGpuVoltage(HocClkIpc_RequestGpuVoltage_Args *args) {
clockManager::ApplyGpuFreqVoltRequest(args->voltage, args->hz);
return 0;
}
Result ServiceHandlerFunc(void *arg, const IpcServerRequest *r, u8 *out_data, size_t *out_dataSize) {
(void)arg;
switch (r->data.cmdId) {
@@ -237,11 +242,8 @@ namespace ipcService {
break;
case HocClkIpcCmd_RequestGpuVoltage:
if (r->data.size >= sizeof(u32)) {
u32 voltage;
memcpy(&voltage, r->data.ptr, sizeof(u32));
clockManager::ApplyGpuVoltageRequest(voltage);
return 0;
if (r->data.size >= sizeof(HocClkIpc_RequestGpuVoltage_Args)) {
return RequestGpuVoltage((HocClkIpc_RequestGpuVoltage_Args *)r->data.ptr);
}
break;
}