aboutsummaryrefslogtreecommitdiff
path: root/modules/devices/gpu.c
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2018-05-19 10:56:17 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2018-05-25 12:32:53 -0700
commitf7aa47059ad769040f699921a9802bd8dc80f00b (patch)
tree8a2e862e009d01525bb33035ffbaee668cbeb834 /modules/devices/gpu.c
parent06cb70200742dad08de5e89b275a73b7c0b0f37b (diff)
devices/gpu: add nvidia-specific section
Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'modules/devices/gpu.c')
-rw-r--r--modules/devices/gpu.c23
1 files changed, 20 insertions, 3 deletions
diff --git a/modules/devices/gpu.c b/modules/devices/gpu.c
index d90bf94a..52a53dac 100644
--- a/modules/devices/gpu.c
+++ b/modules/devices/gpu.c
@@ -114,22 +114,37 @@ static void _gpu_pci_dev(gpud* gpu) {
} else
pcie_str = strdup("");
+ gchar *nv_str;
+ if (gpu->nv_info) {
+ nv_str = g_strdup_printf("[%s]\n"
+ /* model */ "%s=%s\n"
+ /* bios */ "%s=%s\n"
+ /* uuid */ "%s=%s\n",
+ _("NVIDIA"),
+ _("Model"), gpu->nv_info->model,
+ _("BIOS Version"), gpu->nv_info->bios_version,
+ _("UUID"), gpu->nv_info->uuid );
+ } else
+ nv_str = strdup("");
+
str = g_strdup_printf("[%s]\n"
/* Location */ "%s=%s\n"
/* DRM Dev */ "%s=%s\n"
/* Class */ "%s=[%04x] %s\n"
"%s"
/* Revision */ "%s=%02x\n"
- "%s"
+ /* NV */ "%s"
+ /* PCIe */ "%s"
"[%s]\n"
- /* Driver */ "%s=%s\n"
- /* Modules */ "%s=%s\n",
+ /* Driver */ "%s=%s\n"
+ /* Modules */ "%s=%s\n",
_("Device Information"),
_("Location"), gpu->location,
_("DRM Device"), drm_path,
_("Class"), p->class, p->class_str,
vendor_device_str,
_("Revision"), p->revision,
+ nv_str,
pcie_str,
_("Driver"),
_("In Use"), (p->driver) ? p->driver : _("(Unknown)"),
@@ -139,6 +154,8 @@ static void _gpu_pci_dev(gpud* gpu) {
moreinfo_add_with_prefix("DEV", key, str); /* str now owned by morinfo */
g_free(drm_path);
+ g_free(pcie_str);
+ g_free(nv_str);
g_free(vendor_device_str);
g_free(v_str);
g_free(sv_str);