summaryrefslogtreecommitdiff
path: root/hardinfo/gpu_util.c
diff options
context:
space:
mode:
authorLeandro A. F. Pereira <leandro@hardinfo.org>2019-08-10 16:48:51 -0700
committerGitHub <noreply@github.com>2019-08-10 16:48:51 -0700
commitb9157b3f6520f46e788157fbfe9753b209efe9b7 (patch)
tree80d72e25837f3b569734ba476df84d3462617e29 /hardinfo/gpu_util.c
parent7db082583f72598e2118553faf1ba3206d7c3ee7 (diff)
parent4827b88fa34807425640d2a9f07bbf4ac4119ab3 (diff)
Merge branch 'master' into usb3
Diffstat (limited to 'hardinfo/gpu_util.c')
-rw-r--r--hardinfo/gpu_util.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/hardinfo/gpu_util.c b/hardinfo/gpu_util.c
index 17c79a73..b203b426 100644
--- a/hardinfo/gpu_util.c
+++ b/hardinfo/gpu_util.c
@@ -20,7 +20,7 @@
#include "hardinfo.h"
#include "gpu_util.h"
-
+#include "nice_name.h"
#include "cpu_util.h" /* for EMPIFNULL() */
nvgpu *nvgpu_new() {
@@ -229,16 +229,12 @@ static void make_nice_name(gpud *s) {
/* try and a get a "short name" for the vendor */
vendor_str = vendor_get_shortest_name(vendor_str);
- /* These two former special cases are currently handled by the vendor_get_shortest_name()
- * function well enough, but the notes are preserved here. */
- /* nvidia PCI strings are pretty nice already,
- * just shorten the company name */
- // s->nice_name = g_strdup_printf("%s %s", "nVidia", device_str);
- /* Intel Graphics may have very long names, like "Intel Corporation Seventh Generation Something Core Something Something Integrated Graphics Processor Revision Ninety-four"
- * but for now at least shorten "Intel Corporation" to just "Intel" */
- // s->nice_name = g_strdup_printf("%s %s", "Intel", device_str);
-
- if (strstr(vendor_str, "AMD")) {
+ if (strstr(vendor_str, "Intel")) {
+ gchar *device_str_clean = strdup(device_str);
+ nice_name_intel_gpu_device(device_str_clean);
+ s->nice_name = g_strdup_printf("%s %s", vendor_str, device_str_clean);
+ g_free(device_str_clean);
+ } else if (strstr(vendor_str, "AMD")) {
/* AMD PCI strings are crazy stupid because they use the exact same
* chip and device id for a zillion "different products" */
char *full_name = strdup(device_str);