Skip to content
Commits on Source (2)
xorg-server (2:1.20.1-2) UNRELEASED; urgency=medium
xorg-server (2:1.20.1-2) unstable; urgency=medium
* control, rules: Use libunwind for backtracing.
* 07_use-modesetting-driver-by-default-on-GeForce.diff: Add a patch from
Fedora to use modesetting on NVIDIA GeForce8 and newer.
-- Timo Aaltonen <tjaalton@debian.org> Mon, 17 Sep 2018 16:35:31 +0300
-- Timo Aaltonen <tjaalton@debian.org> Tue, 18 Sep 2018 17:27:28 +0300
xorg-server (2:1.20.1-1) unstable; urgency=medium
......
From aa2f34d80ef3118eae0cce73b610c36cdcb978fe Mon Sep 17 00:00:00 2001
From: Ben Skeggs <bskeggs@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 <bskeggs@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,7 @@
#include <unistd.h>
#include <X11/X.h>
#include <pciaccess.h>
+#include <xf86drm.h>
#include "os.h"
#include "Pci.h"
#include "xf86.h"
@@ -1190,6 +1191,25 @@ xf86VideoPtrToDriverList(struct pci_device *dev,
int idx = 0;
#ifdef __linux__
+ 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
......@@ -5,3 +5,4 @@
03_static-nettle.diff
05_Revert-Unload-submodules.diff
06_use-intel-only-on-pre-gen4.diff
07_use-modesetting-driver-by-default-on-GeForce.diff