42 lines
676 B
C
42 lines
676 B
C
#ifndef GPU_H
|
|
#define GPU_H
|
|
|
|
#include <stdbool.h>
|
|
#include <stdint.h>
|
|
|
|
struct gpu_sensors_t {
|
|
uint64_t vram_used;
|
|
// uint64_t vram_total = 0;
|
|
|
|
float vcore;
|
|
|
|
uint16_t clock_core;
|
|
uint16_t clock_mem;
|
|
|
|
// uint8_t fan_pwm = 0;
|
|
uint16_t fan_speed;
|
|
|
|
uint16_t power_avg;
|
|
uint16_t power_cap;
|
|
// uint16_t power_cap_max = 0;
|
|
|
|
uint8_t temp_edge;
|
|
uint8_t temp_hotspot;
|
|
uint8_t temp_mem;
|
|
uint8_t temp_vrm_gfx;
|
|
uint8_t temp_vrm_soc;
|
|
uint8_t temp_vrm_mem;
|
|
|
|
bool has_gpu_metrics;
|
|
|
|
uint8_t usage_core;
|
|
uint8_t usage_media;
|
|
uint8_t usage_umc;
|
|
|
|
char hwmon[128];
|
|
};
|
|
|
|
void gpu_detect(struct gpu_sensors_t *t, const char *pci);
|
|
void gpu_update(struct gpu_sensors_t *g);
|
|
|
|
#endif |