diff options
author | Stefan Reinauer <stefan.reinauer@coreboot.org> | 2020-10-23 01:42:25 +0000 |
---|---|---|
committer | Patrick Georgi <pgeorgi@google.com> | 2020-10-26 06:56:36 +0000 |
commit | f3b1a53858299fd29f442b597212aecf75f84cbe (patch) | |
tree | b1780758e537fd9d42baf997bb13bf0d41d7fb06 /util/inteltool/inteltool.c | |
parent | 91893ee7857fde783150ea14e376fb63d159aa4d (diff) |
inteltool: Only use real graphics devices
Right now IGD is hard coded to 0:2.0 and if that
device is there, it is blindly used, even if it is
not a graphics device. Look at the PCI class to make
sure we're not using the wrong device.
Change-Id: Ia7f52071bd202e2960faba0f46e4fa5e14ad65f8
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46673
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'util/inteltool/inteltool.c')
-rw-r--r-- | util/inteltool/inteltool.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/util/inteltool/inteltool.c b/util/inteltool/inteltool.c index aadd0fb3c4..3fb7707a2a 100644 --- a/util/inteltool/inteltool.c +++ b/util/inteltool/inteltool.c @@ -773,13 +773,13 @@ int main(int argc, char *argv[]) } gfx = pci_get_dev(pacc, 0, 0, 0x02, 0); - if (gfx) { pci_fill_info(gfx, PCI_FILL_IDENT | PCI_FILL_BASES | PCI_FILL_CLASS); - - if (gfx->vendor_id != PCI_VENDOR_ID_INTEL) - gfx = 0; + if ((gfx->device_class & 0xff00) != 0x0300) + gfx = NULL; + else if (gfx->vendor_id != PCI_VENDOR_ID_INTEL) + gfx = NULL; } if (sb->device_id == PCI_DEVICE_ID_INTEL_BAYTRAIL_LPC) { |