Source: xorg-server Version: 2:1.20.1-2 Severity: important Tags: patch Hello,
Since 2:1.20.1-2 the non-drm builds (on hurd-any) fail, because the 07_use-modesetting-driver-by-default-on-GeForce.diff patch unconditionally includes xf86drm.h. I have attached a patch over the patch, and the resulting updated patch, whichever you prefer to use :) Samuel -- System Information: Debian Release: bullseye/sid APT prefers testing APT policy: (990, 'testing'), (500, 'unstable-debug'), (500, 'testing-debug'), (500, 'stable-debug'), (500, 'proposed-updates-debug'), (500, 'proposed-updates'), (500, 'oldstable-proposed-updates-debug'), (500, 'oldstable-proposed-updates'), (500, 'oldoldstable'), (500, 'buildd-unstable'), (500, 'unstable'), (500, 'stable'), (500, 'oldstable'), (1, 'experimental-debug'), (1, 'buildd-experimental'), (1, 'experimental') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.4.0 (SMP w/8 CPU cores) Kernel taint flags: TAINT_OOT_MODULE Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8), LANGUAGE=fr_FR.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) -- Samuel > dvips -o $@ $< Faut faire gffe de pas te couper avec ton truc, t'as mis des ciseaux ($<) partout :)) -+- Dom in Guide du linuxien pervers - "J'aime pas les Makefile !" -+-
--- debian/patches/07_use-modesetting-driver-by-default-on-GeForce.diff.orig 2019-12-29 23:14:56.170075293 +0100 +++ debian/patches/07_use-modesetting-driver-by-default-on-GeForce.diff 2019-12-29 23:15:09.090178045 +0100 @@ -13,11 +13,13 @@ index 8158c2b62..78d1c947d 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c -@@ -37,6 +37,7 @@ +@@ -37,6 +37,9 @@ #include <unistd.h> #include <X11/X.h> #include <pciaccess.h> ++#if defined(__linux__) || defined(__NetBSD__) +#include <xf86drm.h> ++#endif #include "os.h" #include "Pci.h" #include "xf86.h"
>From aa2f34d80ef3118eae0cce73b610c36cdcb978fe Mon Sep 17 00:00:00 2001 From: Ben Skeggs <bske...@redhat.com> 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 <bske...@redhat.com> --- hw/xfree86/common/xf86pciBus.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c index 8158c2b62..78d1c947d 100644 --- a/hw/xfree86/common/xf86pciBus.c +++ b/hw/xfree86/common/xf86pciBus.c @@ -37,6 +37,9 @@ #include <unistd.h> #include <X11/X.h> #include <pciaccess.h> +#if defined(__linux__) || defined(__NetBSD__) +#include <xf86drm.h> +#endif #include "os.h" #include "Pci.h" #include "xf86.h" @@ -1190,6 +1191,25 @@ xf86VideoPtrToDriverList(struct pci_device *dev, 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"; -- 2.12.2