summaryrefslogtreecommitdiff
path: root/xserver
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2019-09-15 12:31:09 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2019-09-15 12:31:09 +0000
commit6b15b4663a3f42102572fcf88ead99f7044b1e63 (patch)
tree40f11903aa538b24dd37944424a37b47db12908a /xserver
parentf0a8f3f505e870c40d569fb10ff400ff55045052 (diff)
Add modesetting driver as a fall-back when appropriate such that we can
use it when running withour root privileges which prevents us from scanning the PCI bus. This makes startx(1)/xinit(1) work again on modern systems with inteldrm(4), radeondrm(4) and amdgpu(4). In some cases this will result in using a different driver than with xenodm(4) which may expose issues (e.g. when we prefer the intel Xorg driver) or loss of acceleration (e.g. older cards supported by radeondrm(4)). ok jsg@, matthieu@
Diffstat (limited to 'xserver')
-rw-r--r--xserver/hw/xfree86/common/xf86AutoConfig.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/xserver/hw/xfree86/common/xf86AutoConfig.c b/xserver/hw/xfree86/common/xf86AutoConfig.c
index 3b6bd05a2..4a876293e 100644
--- a/xserver/hw/xfree86/common/xf86AutoConfig.c
+++ b/xserver/hw/xfree86/common/xf86AutoConfig.c
@@ -257,10 +257,17 @@ listPossibleVideoDrivers(XF86MatchedDrivers *md)
break;
}
+ switch (gtype) {
#if defined(__i386__) || defined(__amd64__)
- if (gtype == WSDISPLAY_TYPE_PCIVGA)
+ case WSDISPLAY_TYPE_PCIVGA:
xf86AddMatchedDriver(md, "vesa");
+ break;
#endif
+ case WSDISPLAY_TYPE_INTELDRM:
+ case WSDISPLAY_TYPE_RADEONDRM:
+ xf86AddMatchedDriver(md, "modesetting");
+ break;
+ }
}
#else