summaryrefslogtreecommitdiffstats
path: root/src/loader/loader.c
diff options
context:
space:
mode:
authorRob Clark <[email protected]>2015-02-15 01:59:17 -0500
committerRob Clark <[email protected]>2015-02-21 17:11:02 -0500
commit9153dd4b7eb95728aa9746a45a9dd136458d0213 (patch)
tree2ace02a3dfb0d5c7b3c3dd7da0651a5eb8736331 /src/loader/loader.c
parente17437386c1bf715b6b241bd9de3a583103f851b (diff)
loader: not having a pci-id should not be a warn
If there is no pci-id, which is valid for vc4 and freedreno, just emit an info msg. Keep malformed but existing pci-id's as a warning. Mostly just to clean up a warning that confuses users for the non-pci devices. Signed-off-by: Rob Clark <[email protected]>
Diffstat (limited to 'src/loader/loader.c')
-rw-r--r--src/loader/loader.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/loader/loader.c b/src/loader/loader.c
index 94c993ac841..9ff5115221f 100644
--- a/src/loader/loader.c
+++ b/src/loader/loader.c
@@ -207,9 +207,12 @@ libudev_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id)
}
pci_id = udev_device_get_property_value(parent, "PCI_ID");
- if (pci_id == NULL ||
- sscanf(pci_id, "%x:%x", vendor_id, chip_id) != 2) {
- log_(_LOADER_WARNING, "MESA-LOADER: malformed or no PCI ID\n");
+ if (pci_id == NULL) {
+ log_(_LOADER_INFO, "MESA-LOADER: no PCI ID\n");
+ *chip_id = -1;
+ goto out;
+ } else if (sscanf(pci_id, "%x:%x", vendor_id, chip_id) != 2) {
+ log_(_LOADER_WARNING, "MESA-LOADER: malformed PCI ID\n");
*chip_id = -1;
goto out;
}