summaryrefslogtreecommitdiff
path: root/sys/dev
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2006-07-20 20:54:52 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2006-07-20 20:54:52 +0000
commita1f3f924b2978f47d07ab694ed46bb3cf5cc7950 (patch)
treeee7e86cebc0de7f323a96a2008fc422202d77358 /sys/dev
parent193af5f2eb33f54e4c65ca45a30bac5fb8fcc53d (diff)
Enable bus master; X probably needs it to do accelerated graphics.
ok deraadt@
Diffstat (limited to 'sys/dev')
-rw-r--r--sys/dev/pci/vga_pci.c10
1 files changed, 9 insertions, 1 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c
index 53cd29bf18f..83588cb5680 100644
--- a/sys/dev/pci/vga_pci.c
+++ b/sys/dev/pci/vga_pci.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: vga_pci.c,v 1.23 2006/03/16 21:32:34 matthieu Exp $ */
+/* $OpenBSD: vga_pci.c,v 1.24 2006/07/20 20:54:51 kettenis Exp $ */
/* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */
/*
@@ -142,6 +142,14 @@ void
vga_pci_attach(struct device *parent, struct device *self, void *aux)
{
struct pci_attach_args *pa = aux;
+ pcireg_t reg;
+
+ /*
+ * Enable bus master; X might need this for accelerated graphics.
+ */
+ reg = pci_conf_read(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG);
+ reg |= PCI_COMMAND_MASTER_ENABLE;
+ pci_conf_write(pa->pa_pc, pa->pa_tag, PCI_COMMAND_STATUS_REG, reg);
#ifdef PCIAGP
agp_attach(parent, self, aux);