vga_pci.c (279494) | vga_pci.c (284012) |
---|---|
1/*- 2 * Copyright (c) 2005 John Baldwin <jhb@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/*- 2 * Copyright (c) 2005 John Baldwin <jhb@FreeBSD.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/dev/pci/vga_pci.c 279494 2015-03-01 20:54:29Z dumbbell $"); | 28__FBSDID("$FreeBSD: head/sys/dev/pci/vga_pci.c 284012 2015-06-05 06:23:03Z hselasky $"); |
29 30/* 31 * Simple driver for PCI VGA display devices. Drivers such as agp(4) and 32 * drm(4) should attach as children of this device. 33 * 34 * XXX: The vgapci name is a hack until we somehow merge the isa vga driver 35 * in or rename it. 36 */ --- 84 unchanged lines hidden (view full) --- 121 if ((config & PCIB_BCR_VGA_ENABLE) == 0) 122 return (0); 123 } 124 125 config = pci_read_config(dev, PCIR_COMMAND, 2); 126 if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0) 127 return (0); 128 | 29 30/* 31 * Simple driver for PCI VGA display devices. Drivers such as agp(4) and 32 * drm(4) should attach as children of this device. 33 * 34 * XXX: The vgapci name is a hack until we somehow merge the isa vga driver 35 * in or rename it. 36 */ --- 84 unchanged lines hidden (view full) --- 121 if ((config & PCIB_BCR_VGA_ENABLE) == 0) 122 return (0); 123 } 124 125 config = pci_read_config(dev, PCIR_COMMAND, 2); 126 if ((config & (PCIM_CMD_PORTEN | PCIM_CMD_MEMEN)) == 0) 127 return (0); 128 |
129 /* 130 * Disable interrupts until a chipset driver is loaded for 131 * this PCI device. Else unhandled display adapter interrupts 132 * might freeze the CPU. 133 */ 134 pci_write_config(dev, PCIR_COMMAND, config | PCIM_CMD_INTxDIS, 2); 135 |
|
129 /* This video card is the boot display: record its unit number. */ 130 vga_pci_default_unit = unit; 131 device_set_flags(dev, 1); 132 133 return (1); 134} 135 136void * --- 500 unchanged lines hidden --- | 136 /* This video card is the boot display: record its unit number. */ 137 vga_pci_default_unit = unit; 138 device_set_flags(dev, 1); 139 140 return (1); 141} 142 143void * --- 500 unchanged lines hidden --- |