X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciDeviceSupport.c;fp=MdeModulePkg%2FBus%2FPci%2FPciBusDxe%2FPciDeviceSupport.c;h=ab791541c34d4054a933d7fab98f68d3194cc8b5;hb=983f5abb9a0d6cf9cfb5e16d671f15e5dc7510d8;hp=5a4b83060445e2fcbc035c6c2d308dfc18a6889b;hpb=06da1e310bcea971073a8dabc5c3d35bc190847c;p=mirror_edk2.git diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index 5a4b830604..ab791541c3 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -979,33 +979,33 @@ PciDeviceExisted ( } /** - Get the active VGA device on the same segment. + Get the active VGA device on the specified Host Bridge. - @param VgaDevice PCI IO instance for the VGA device. + @param HostBridgeHandle Host Bridge handle. - @return The active VGA device on the same segment. + @return The active VGA device on the specified Host Bridge. **/ PCI_IO_DEVICE * -ActiveVGADeviceOnTheSameSegment ( - IN PCI_IO_DEVICE *VgaDevice +LocateVgaDeviceOnHostBridge ( + IN EFI_HANDLE HostBridgeHandle ) { LIST_ENTRY *CurrentLink; - PCI_IO_DEVICE *Temp; + PCI_IO_DEVICE *PciIoDevice; CurrentLink = mPciDevicePool.ForwardLink; while (CurrentLink != NULL && CurrentLink != &mPciDevicePool) { - Temp = PCI_IO_DEVICE_FROM_LINK (CurrentLink); + PciIoDevice = PCI_IO_DEVICE_FROM_LINK (CurrentLink); - if (Temp->PciRootBridgeIo->SegmentNumber == VgaDevice->PciRootBridgeIo->SegmentNumber) { + if (PciIoDevice->PciRootBridgeIo->ParentHandle== HostBridgeHandle) { - Temp = LocateVgaDevice (Temp); + PciIoDevice = LocateVgaDevice (PciIoDevice); - if (Temp != NULL) { - return Temp; + if (PciIoDevice != NULL) { + return PciIoDevice; } }