intel/devinfo: allow -p to take a pci-id in hexa

Signed-off-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Reviewed-by: Mark Janes <markjanes@swizzler.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22862>
This commit is contained in:
Lionel Landwerlin
2023-05-11 10:17:49 +03:00
committed by Marge Bot
parent fce55ffb7d
commit 9ebd553fc2
+6 -1
View File
@@ -222,7 +222,12 @@ main(int argc, char *argv[])
}
if (platform) {
int pci_id = intel_device_name_to_pci_device_id(platform);
int pci_id;
if (strstr(platform, "0x") == platform)
pci_id = strtol(platform, NULL, 16);
else
pci_id = intel_device_name_to_pci_device_id(platform);
struct intel_device_info devinfo;
if (!intel_get_device_info_from_pci_id(pci_id, &devinfo))