28 lines
1.1 KiB
C
28 lines
1.1 KiB
C
#include <nvml.h>
|
|
|
|
#include "evga-card.h"
|
|
|
|
struct clock_reason {
|
|
unsigned long long mask;
|
|
char *short_name;
|
|
char *long_name;
|
|
};
|
|
|
|
static struct clock_reason clock_reason_names[] =
|
|
{
|
|
{nvmlClocksEventReasonGpuIdle, "Idle", "GPU idle"},
|
|
{nvmlClocksEventReasonApplicationsClocksSetting, "AppClk", "Application clocks"},
|
|
{nvmlClocksEventReasonSwPowerCap, "Pwr", "Power cap"},
|
|
{nvmlClocksThrottleReasonHwSlowdown, "HWSlow", "Hardware slowdown"},
|
|
{nvmlClocksEventReasonSyncBoost, "Sync", "Sync boost"},
|
|
{nvmlClocksEventReasonSwThermalSlowdown, "SWTherm", "Software thermal"},
|
|
{nvmlClocksThrottleReasonHwThermalSlowdown, "HWTherm", "Hardware thermal"},
|
|
{nvmlClocksThrottleReasonHwPowerBrakeSlowdown, "HWPower", "Hardware power brake"},
|
|
{nvmlClocksEventReasonDisplayClockSetting, "DispClk", "Display clock"}
|
|
};
|
|
|
|
void init_nvml();
|
|
void print_nvml_temp(int compact, struct card_info *card);
|
|
void print_nvml_clock_reason(int compact, struct card_info *card);
|
|
unsigned int get_nvml_temp(struct card_info *card);
|
|
unsigned long long get_nvml_clock_reasons(struct card_info *card); |