diff options
author | 2007-11-28 23:37:34 +0000 | |
---|---|---|
committer | 2007-11-28 23:37:34 +0000 | |
commit | a9412f7d64307623fd22cbc5a5a0c8f16f4af268 (patch) | |
tree | 3c64cdf1366724256138d24252a75cd6fdfcb7db /sys/dev/pci/vga_pci.c | |
parent | <oga> art write me a manpage (diff) | |
download | wireguard-openbsd-a9412f7d64307623fd22cbc5a5a0c8f16f4af268.tar.xz wireguard-openbsd-a9412f7d64307623fd22cbc5a5a0c8f16f4af268.zip |
Initial import of the DRM (direct rendering manager).
This is the kernel part necessary for DRI support in X. Disabled for now
because it still has a few bugs, but now I can work on it in tree. Also
requires the requisite bits in X, which are currently under discussion
on how to deal with them with privsep. ported from a combination of the
free and netbsd implementations.
Known bugs:
1) only the first occurence of X in any session will have dri, after
that something prevents it working.
2) if the machine does not have a dri capable card, the kernel panics.
Something's up in one of the probe functions. I haven't been able to
find it though.
3) radeon cards need to be forced to use PCI mode otherwise they get
into an infinite loop.
This is known to at least kinda work with SiS, radeons in pci mode and
intel cards.
ok deraadt, kinda ok art, a few other people had a quick look.
Diffstat (limited to 'sys/dev/pci/vga_pci.c')
-rw-r--r-- | sys/dev/pci/vga_pci.c | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/sys/dev/pci/vga_pci.c b/sys/dev/pci/vga_pci.c index 2535be4ead7..6f8abdb67c3 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.28 2007/11/25 17:11:12 oga Exp $ */ +/* $OpenBSD: vga_pci.c,v 1.29 2007/11/28 23:37:34 oga Exp $ */ /* $NetBSD: vga_pci.c,v 1.3 1998/06/08 06:55:58 thorpej Exp $ */ /* @@ -93,9 +93,12 @@ #include <dev/vesa/vesabiosvar.h> #endif +#include "drmbase.h" + int vga_pci_match(struct device *, void *, void *); void vga_pci_attach(struct device *, struct device *, void *); paddr_t vga_pci_mmap(void* v, off_t off, int prot); +int vga_drm_print(void *, const char *); #ifdef VESAFB int vesafb_putcmap(struct vga_pci_softc *, struct wsdisplay_cmap *); @@ -161,6 +164,18 @@ vga_pci_attach(struct device *parent, struct device *self, void *aux) printf("\n"); vga_common_attach(self, pa->pa_iot, pa->pa_memt, WSDISPLAY_TYPE_PCIVGA); + +#if NDRMBASE > 0 + config_found(self, aux, vga_drm_print); +#endif +} + +int +vga_drm_print(void *aux, const char *pnp) +{ + if (pnp) + printf("direct rendering for %s", pnp); + return (UNSUPP); } paddr_t |