mirror of
https://github.com/jkocon/g-helper.git
synced 2026-02-23 13:00:52 +01:00
Ally TDP (#2503)
* Init * TDP fixes * TDP tweaks * AutoTDP toggle * AutoTDP tweaks * AutoTDP tweaks * TDP tweaks * Cleanup * Power based AutoTDP * TDP tweaks
This commit is contained in:
@@ -119,6 +119,18 @@ public class AmdGpuControl : IGpuControl
|
||||
|
||||
}
|
||||
|
||||
public int? GetGpuPower()
|
||||
{
|
||||
if (_adlContextHandle == nint.Zero || _iGPU == null) return null;
|
||||
if (ADL2_New_QueryPMLogData_Get(_adlContextHandle, ((ADLAdapterInfo)_iGPU).AdapterIndex, out ADLPMLogDataOutput adlpmLogDataOutput) != Adl2.ADL_SUCCESS) return null;
|
||||
|
||||
ADLSingleSensorData gpuUsage = adlpmLogDataOutput.Sensors[(int)ADLSensorType.PMLOG_ASIC_POWER];
|
||||
if (gpuUsage.Supported == 0) return null;
|
||||
|
||||
return gpuUsage.Value;
|
||||
|
||||
}
|
||||
|
||||
|
||||
public bool SetVariBright(int enabled)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user