From acd0240b8f28f165ca712c44cb34911a8adbfc50 Mon Sep 17 00:00:00 2001 From: Eric Hameleers Date: Wed, 17 Jun 2020 23:14:18 +0200 Subject: Deps/xorg-server: refresh the build script Sync with the Slackware version. Used in an attempt to troubleshoot the VT switch behaviour in runlevel 3 with elogind installed... turned out that /usr/bin/startx needed a different patch, replacing a systemd check with an elogind check. --- ...-modesetting-driver-by-default-on-GeForce.patch | 47 ++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 deps/xorg-server/patches/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch (limited to 'deps/xorg-server/patches/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch') diff --git a/deps/xorg-server/patches/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch b/deps/xorg-server/patches/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch new file mode 100644 index 0000000..87b2877 --- /dev/null +++ b/deps/xorg-server/patches/0001-xfree86-use-modesetting-driver-by-default-on-GeForce.patch @@ -0,0 +1,47 @@ +From aa2f34d80ef3118eae0cce73b610c36cdcb978fe Mon Sep 17 00:00:00 2001 +From: Ben Skeggs +Date: Sat, 22 Apr 2017 02:26:28 +1000 +Subject: [PATCH xserver] xfree86: use modesetting driver by default on GeForce + 8 and newer + +Signed-off-by: Ben Skeggs +--- + hw/xfree86/common/xf86pciBus.c | 20 ++++++++++++++++++++ + 1 file changed, 20 insertions(+) + +--- ./hw/xfree86/common/xf86pciBus.c.orig 2019-02-26 13:28:50.000000000 -0600 ++++ ./hw/xfree86/common/xf86pciBus.c 2019-02-26 17:16:04.131096857 -0600 +@@ -37,6 +37,7 @@ + #include + #include + #include ++#include + #include "os.h" + #include "Pci.h" + #include "xf86.h" +@@ -1191,6 +1192,25 @@ + int idx = 0; + + #if defined(__linux__) || defined(__NetBSD__) ++ char busid[32]; ++ int fd; ++ ++ snprintf(busid, sizeof(busid), "pci:%04x:%02x:%02x.%d", ++ dev->domain, dev->bus, dev->dev, dev->func); ++ ++ /* 'modesetting' is preferred for GeForce 8 and newer GPUs */ ++ fd = drmOpenWithType("nouveau", busid, DRM_NODE_RENDER); ++ if (fd >= 0) { ++ uint64_t args[] = { 11 /* NOUVEAU_GETPARAM_CHIPSET_ID */, 0 }; ++ int ret = drmCommandWriteRead(fd, 0 /* DRM_NOUVEAU_GETPARAM */, ++ &args, sizeof(args)); ++ drmClose(fd); ++ if (ret == 0) { ++ if (args[1] == 0x050 || args[1] >= 0x80) ++ break; ++ } ++ } ++ + driverList[idx++] = "nouveau"; + #endif + driverList[idx++] = "nv"; -- cgit v1.2.3-65-gdbad