diff options
author | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-03-16 19:00:29 +0000 |
---|---|---|
committer | Owain Ainsworth <oga@cvs.openbsd.org> | 2008-03-16 19:00:29 +0000 |
commit | c5322cc7f26f297d89d5739341558d77a823ca0a (patch) | |
tree | 89262368ac92e725ff85a9bd6201003c7e69d4c7 /sys/dev/ic/vga.c | |
parent | 68d85f5a89fb982d3c281c6c189cd217dc0d9ae0 (diff) |
Make agp(4) attach at vga(4) instead of pchb(4). This is because sometimes
agp and drm need to use the same memory mapping, the best way to deal
with that is to allow them to share (that's coming later), for this to
work cleanly we move the attach point of agp.
Ideally most agp drivers would attach at pchb, with only agp_i810
(and any that work similarly) attaching at vga, but this will do for
now.
ok kettenis@, miod@.
Diffstat (limited to 'sys/dev/ic/vga.c')
-rw-r--r-- | sys/dev/ic/vga.c | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index e7458f9456d..0f64441b4a0 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vga.c,v 1.46 2007/10/01 04:03:51 krw Exp $ */ +/* $OpenBSD: vga.c,v 1.47 2008/03/16 19:00:28 oga Exp $ */ /* $NetBSD: vga.c,v 1.28.2.1 2000/06/30 16:27:47 simonb Exp $ */ /* @@ -100,6 +100,8 @@ int vga_alloc_attr(void *, int, int, int, long *); void vga_copyrows(void *, int, int, int); void vga_unpack_attr(void *, long, int *, int *, int *); +int displaysubmatch(struct device *, void *, void *); + static const struct wsdisplay_emulops vga_emulops = { pcdisplay_cursor, vga_mapchar, @@ -545,7 +547,19 @@ vga_extended_attach(self, iot, memt, type, map) aa.accesscookie = vc; aa.defaultscreens = 0; - config_found(self, &aa, wsemuldisplaydevprint); + config_found_sm(self, &aa, wsemuldisplaydevprint, displaysubmatch); +} + +int +displaysubmatch(struct device *parent, void *match, void *aux) +{ + extern struct cfdriver wsdisplay_cd; + struct cfdata *cf = match; + + /* only allow wsdisplay to attach */ + if (cf->cf_driver == &wsdisplay_cd) + return ((*cf->cf_attach->ca_match)(parent, match, aux)); + return (0); } int |