Lines Matching +full:display +full:- +full:bridge

1 /*-
2 * SPDX-License-Identifier: BSD-2-Clause
30 * Simple driver for PCI VGA display devices. Drivers such as agp(4) and
53 #include <compat/x86bios/x86bios.h> /* To re-POST the card. */
75 int vga_pci_default_unit = -1;
77 &vga_pci_default_unit, -1, "Default VGA-compatible display");
96 * The boot display device was determined by a previous in vga_pci_is_boot_display()
104 * The primary video card used as a boot display must have the in vga_pci_is_boot_display()
108 * Furthermore, if the card is attached to a bridge, instead of in vga_pci_is_boot_display()
109 * the root PCI bus, the bridge must have the "VGA Enable" bit in vga_pci_is_boot_display()
117 * The parent bridge is a PCI-to-PCI bridge: check the in vga_pci_is_boot_display()
131 * this PCI device. Else unhandled display adapter interrupts in vga_pci_is_boot_display()
136 /* This video card is the boot display: record its unit number. */ in vga_pci_is_boot_display()
148 * FLR is unsupported on GPUs so attempt a power-management reset by cycling in vga_pci_reset()
175 * On x86, the System BIOS copy the default display in vga_pci_map_bios()
192 * The parent bridge is a PCI-to-PCI bridge: check the in vga_pci_map_bios()
233 device_printf(dev, "initial ROM mapping failed -- resetting\n"); in vga_pci_map_bios()
244 vga_pci_release_resource(dev, NULL, vr->vr_res); in vga_pci_map_bios()
247 * re-allocate in vga_pci_map_bios()
267 vga_pci_release_resource(dev, NULL, vr->vr_res); in vga_pci_map_bios()
307 KASSERT(vr->vr_res != NULL, ("vga_pci_unmap_bios: bios not mapped")); in vga_pci_unmap_bios()
308 KASSERT(rman_get_virtual(vr->vr_res) == bios, in vga_pci_unmap_bios()
310 vga_pci_release_resource(dev, NULL, vr->vr_res); in vga_pci_unmap_bios()
358 /* Probe default display. */ in vga_pci_probe()
361 device_set_desc(dev, "VGA-compatible display"); in vga_pci_probe()
419 return (&sc->vga_bios); in lookup_res()
422 return (&sc->vga_bars[bar]); in lookup_res()
442 if (vr->vr_res == NULL) in vga_pci_alloc_resource()
443 vr->vr_res = bus_alloc_resource(dev, type, rid, start, in vga_pci_alloc_resource()
445 if (vr->vr_res != NULL) in vga_pci_alloc_resource()
446 vr->vr_refs++; in vga_pci_alloc_resource()
447 return (vr->vr_res); in vga_pci_alloc_resource()
468 if (vr->vr_res == NULL) in vga_pci_release_resource()
470 KASSERT(vr->vr_res == r, ("vga_pci resource mismatch")); in vga_pci_release_resource()
471 if (vr->vr_refs > 1) { in vga_pci_release_resource()
472 vr->vr_refs--; in vga_pci_release_resource()
475 KASSERT(vr->vr_refs > 0, in vga_pci_release_resource()
479 vr->vr_res = NULL; in vga_pci_release_resource()
480 vr->vr_refs = 0; in vga_pci_release_resource()
634 if (sc->vga_msi_child != NULL) in vga_pci_alloc_msi()
638 sc->vga_msi_child = child; in vga_pci_alloc_msi()
649 if (sc->vga_msi_child != NULL) in vga_pci_alloc_msix()
653 sc->vga_msi_child = child; in vga_pci_alloc_msix()
664 if (sc->vga_msi_child != child) in vga_pci_remap_msix()
676 if (sc->vga_msi_child != child) in vga_pci_release_msi()
680 sc->vga_msi_child = NULL; in vga_pci_release_msi()