summaryrefslogtreecommitdiff
path: root/sys/dev/pci/agp.c
diff options
context:
space:
mode:
authorOwain Ainsworth <oga@cvs.openbsd.org>2008-05-06 19:19:03 +0000
committerOwain Ainsworth <oga@cvs.openbsd.org>2008-05-06 19:19:03 +0000
commit0d12c3f56a9965c9c1fbab7d8a961c9e121bc885 (patch)
tree1b8da77e839c5cdd95bbfe014dc6f76d6d8f5d4c /sys/dev/pci/agp.c
parent6326e66a01c7b4d7ac0ec2d749c33423122e90bd (diff)
currently agp_i810 needs to map the same BAR as inteldrm, this obviously
fails. In order to allow this, implement an API so that drm and agp can share mappings for the BARs. Now it works as it should. tested by many. ok kettenis, miod said he'd look at it when it's in tree.
Diffstat (limited to 'sys/dev/pci/agp.c')
-rw-r--r--sys/dev/pci/agp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/dev/pci/agp.c b/sys/dev/pci/agp.c
index 6c297f9031a..15f31704d45 100644
--- a/sys/dev/pci/agp.c
+++ b/sys/dev/pci/agp.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: agp.c,v 1.20 2008/04/09 18:59:58 oga Exp $ */
+/* $OpenBSD: agp.c,v 1.21 2008/05/06 19:19:02 oga Exp $ */
/*-
* Copyright (c) 2000 Doug Rabson
* All rights reserved.
@@ -176,6 +176,8 @@ agp_attach(struct device *parent, struct device *self, void *aux)
pci_get_capability(sc->sc_pc, sc->sc_pcitag, PCI_CAP_AGP,
&sc->sc_capoff, NULL);
+ sc->vga_softc = (struct vga_pci_softc *)parent;
+
printf(": ");
ret = (*ap->ap_attach)(sc, pa);
if (ret == 0)