diff options
author | Burt P <pburt0@gmail.com> | 2018-12-02 12:45:57 -0600 |
---|---|---|
committer | Leandro A. F. Pereira <leandro@hardinfo.org> | 2018-12-03 02:28:18 -0800 |
commit | df174e34e8e039abbf4187812dd4aded095e3a2b (patch) | |
tree | 811644e0a1b797d09d2385b838f404138237aaa9 | |
parent | 6e6e311d801a45b4566a3f161e445fe355581e09 (diff) |
gpu_util: fix intel gpu freq
Signed-off-by: Burt P <pburt0@gmail.com>
-rw-r--r-- | hardinfo/gpu_util.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/hardinfo/gpu_util.c b/hardinfo/gpu_util.c index b43cf648..ec08afb6 100644 --- a/hardinfo/gpu_util.c +++ b/hardinfo/gpu_util.c @@ -86,9 +86,9 @@ static void intel_fill_freq(gpud *s) { gchar path[256] = ""; gchar *min_mhz = NULL, *max_mhz = NULL; if (s->sysfs_drm_path) { - snprintf(path, 255, "%s/gt_min_freq_mhz", s->sysfs_drm_path); + snprintf(path, 255, "%s/%s/gt_min_freq_mhz", s->sysfs_drm_path, s->id); g_file_get_contents(path, &min_mhz, NULL, NULL); - snprintf(path, 255, "%s/gt_max_freq_mhz", s->sysfs_drm_path); + snprintf(path, 255, "%s/%s/gt_max_freq_mhz", s->sysfs_drm_path, s->id); g_file_get_contents(path, &max_mhz, NULL, NULL); if (min_mhz) @@ -375,7 +375,7 @@ gpud *gpu_get_device_list() { /* drm has the card */ drm_dev = strstr(drm_id, "card"); if (drm_dev) - snprintf(card_id, 64, "drm-%s", drm_dev); + snprintf(card_id, 64, "%s", drm_dev); } if (strlen(card_id) == 0) { |