summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBenjamin Doron <benjamin.doron00@gmail.com>2020-08-06 19:13:09 +0000
committerPatrick Georgi <pgeorgi@google.com>2020-08-17 07:12:46 +0000
commit2875df1c9e5fd32699d937623363109c24c91c0a (patch)
tree7517910d1b711e661ed97e21fb5ea1ecde7108e0
parent6fd87ffe2e44ea8782446e00ac06f66612e32bec (diff)
soc/intel/skylake/acpi.c: Name devices on secondary bus
Naming a device allows an ACPI _ROM method to be written for it. GPUs may require this to make the configuration data contained within available to an OS driver. This may be required for GPUs that do not contain their vBIOS, or perhaps the drivers require it in this form/fashion. Working on an Acer Aspire VN7-572G (Skylake-U). nouveau successfully obtains the vBIOS via ACPI (kernel 5.7.11). Change-Id: Ida87aebf8fdf341ab350c2bb3704d2ef695cf8f0 Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/43074 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Patrick Rudolph <siro@das-labor.org>
-rw-r--r--src/soc/intel/skylake/acpi.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/soc/intel/skylake/acpi.c b/src/soc/intel/skylake/acpi.c
index ae9d78436c..0ec6e472ca 100644
--- a/src/soc/intel/skylake/acpi.c
+++ b/src/soc/intel/skylake/acpi.c
@@ -632,12 +632,18 @@ const char *soc_acpi_name(const struct device *dev)
if (dev->path.type != DEVICE_PATH_PCI)
return NULL;
- /* Only match devices on the root bus */
- if (dev->bus && dev->bus->secondary > 0)
+ /* Match functions 0 and 1 for possible GPUs on a secondary bus */
+ if (dev->bus && dev->bus->secondary > 0) {
+ switch (PCI_FUNC(dev->path.pci.devfn)) {
+ case 0: return "DEV0";
+ case 1: return "DEV1";
+ }
return NULL;
+ }
switch (dev->path.pci.devfn) {
case SA_DEVFN_ROOT: return "MCHC";
+ case SA_DEVFN_PEG0: return "PEGP";
case SA_DEVFN_IGD: return "GFX0";
case PCH_DEVFN_ISH: return "ISHB";
case PCH_DEVFN_XHCI: return "XHCI";