Sync from SUSE:SLFO:Main xorg-x11-server revision 8d98b0912928293ed0e9c4983858b5e7

This commit is contained in:
Adrian Schröter 2024-05-04 02:15:05 +02:00
commit dddec4b075
50 changed files with 10813 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

9
50-extensions.conf Normal file
View File

@ -0,0 +1,9 @@
# Add extensions to be disabled. This may be needed as some
# extra modules may add extensions which cause the maximum
# number of extensions possible to be exceeded.
#
# SUSE Default: disable DGA.
Section "Extensions"
Option "XFree86-DGA" "Disable"
EndSection

View File

@ -0,0 +1,34 @@
From: Egbert Eich <eich@suse.de>
Date: Tue Apr 12 09:22:40 2016 +0200
Subject: [PATCH]Install: Avoid failure on wrapper installation
Patch-mainline: never
References:
Signed-off-by: Egbert Eich <eich@suse.com>
- Check for SUID_WRAPPER_DIR being identical to bindir
before copying script.
- Check whether user is root before doing a chmod/chown
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/Makefile.am | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Index: xorg-server-1.20.5/hw/xfree86/Makefile.am
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/Makefile.am
+++ xorg-server-1.20.5/hw/xfree86/Makefile.am
@@ -113,9 +113,10 @@ if INSTALL_SETUID
endif
if SUID_WRAPPER
$(MKDIR_P) $(DESTDIR)$(SUID_WRAPPER_DIR)
- mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg
- ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/Xorg
- -chown 0 $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
+ mv $(DESTDIR)$(bindir)/Xorg $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg 2>/dev/null && target=Xorg; \
+ ${INSTALL} -m 755 Xorg.sh $(DESTDIR)$(bindir)/$${target}
+ -test "x$UID" = "x0" -o "x$EUID" = "x0" && \
+ chown root $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap && chmod u+s $(DESTDIR)$(SUID_WRAPPER_DIR)/Xorg.wrap
endif
uninstall-local:

View File

@ -0,0 +1,18 @@
From: Stefan Dirsch <sndirsch@suse.de>
Add /usr/lib[64]/xorg/modules/updates to the module path.
Make sure this path is considered first.
Index: hw/xfree86/common/xf86Globals.c
===================================================================
--- hw/xfree86/common/xf86Globals.c.orig
+++ hw/xfree86/common/xf86Globals.c
@@ -135,7 +135,7 @@ xf86InfoRec xf86Info = {
const char *xf86ConfigFile = NULL;
const char *xf86ConfigDir = NULL;
-const char *xf86ModulePath = DEFAULT_MODULE_PATH;
+const char *xf86ModulePath = DEFAULT_MODULE_PATH "/updates," DEFAULT_MODULE_PATH;
MessageType xf86ModPathFrom = X_DEFAULT;
const char *xf86LogFile = DEFAULT_LOGDIR "/" DEFAULT_LOGPREFIX;
MessageType xf86LogFileFrom = X_DEFAULT;

34
N_driver-autoconfig.diff Normal file
View File

@ -0,0 +1,34 @@
From: Stefan Dirsch <sndirsch@suse.de>
Modify driver fallback list for automatic configuration
such that the proprietary ATI, NVIDIA and VIA drivers are
considered first.
Index: hw/xfree86/common/xf86pciBus.c
===================================================================
--- hw/xfree86/common/xf86pciBus.c.orig
+++ hw/xfree86/common/xf86pciBus.c
@@ -1186,6 +1186,13 @@ xf86VideoPtrToDriverList(struct pci_devi
driverList[0] = "neomagic";
break;
case 0x10de:
+ driverList[0] = "nvidia";
+ driverList[1] = "nouveau";
+ /* GeForce 6150SE support broken (bnc #465190/544674) */
+ if (dev->device_id != 0x03D0) {
+ driverList[2] = "nv";
+ }
+ break;
case 0x12d2:
{
int idx = 0;
@@ -1197,7 +1204,8 @@ xf86VideoPtrToDriverList(struct pci_devi
break;
}
case 0x1106:
- driverList[0] = "openchrome";
+ driverList[0] = "via";
+ driverList[1] = "openchrome";
break;
case 0x1b36:
driverList[0] = "qxl";

62
N_fix-dpi-values.diff Normal file
View File

@ -0,0 +1,62 @@
From: Egbert Eich <eich@suse.de>
Fix calculation of DPI using mode data if present.
Index: hw/xfree86/common/xf86Helper.c
===================================================================
--- hw/xfree86/common/xf86Helper.c.orig
+++ hw/xfree86/common/xf86Helper.c
@@ -875,12 +875,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
else if (pScrn->widthmm > 0 || pScrn->heightmm > 0) {
from = X_CONFIG;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;
@@ -919,12 +929,22 @@ xf86SetDpi(ScrnInfoPtr pScrn, int x, int
pScrn->widthmm = ddcWidthmm;
pScrn->heightmm = ddcHeightmm;
if (pScrn->widthmm > 0) {
- pScrn->xDpi =
- (int) ((double) pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ if (pScrn->modes && pScrn->modes->HDisplay > 0) {
+ pScrn->xDpi =
+ (int)((double) pScrn->modes->HDisplay * MMPERINCH / pScrn->widthmm);
+ } else {
+ pScrn->xDpi =
+ (int)((double)pScrn->virtualX * MMPERINCH / pScrn->widthmm);
+ }
}
if (pScrn->heightmm > 0) {
- pScrn->yDpi =
- (int) ((double) pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ if (pScrn->modes && pScrn->modes->VDisplay > 0) {
+ pScrn->yDpi =
+ (int)((double)pScrn->modes->VDisplay * MMPERINCH / pScrn->heightmm);
+ } else {
+ pScrn->yDpi =
+ (int)((double)pScrn->virtualY * MMPERINCH / pScrn->heightmm);
+ }
}
if (pScrn->xDpi > 0 && pScrn->yDpi <= 0)
pScrn->yDpi = pScrn->xDpi;

View File

@ -0,0 +1,40 @@
From: Stefan Dirsch <sndirsch@suse.de>
Set DefaultDepth for implicite screen section when using FGLRX driver
The binary only AMD FGLRX driver doesn't set the default depth in the
driver. Do it for it in the server.
Index: hw/xfree86/common/xf86AutoConfig.c
===================================================================
--- hw/xfree86/common/xf86AutoConfig.c.orig
+++ hw/xfree86/common/xf86AutoConfig.c
@@ -77,6 +77,13 @@
"\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
"EndSection\n\n"
+#define BUILTIN_SCREEN_SECTION_FOR_FGLRX \
+ "Section \"Screen\"\n" \
+ "\tIdentifier\t" BUILTIN_SCREEN_NAME "\n" \
+ "\tDevice\t" BUILTIN_DEVICE_NAME "\n" \
+ "\tDefaultDepth\t24\n" \
+ "EndSection\n\n"
+
#define BUILTIN_LAYOUT_SECTION_PRE \
"Section \"ServerLayout\"\n" \
"\tIdentifier\t\"Builtin Default Layout\"\n"
@@ -187,8 +194,12 @@ xf86AutoConfig(void)
snprintf(buf, sizeof(buf), BUILTIN_DEVICE_SECTION,
md.matches[i], 0, md.matches[i]);
AppendToConfig(buf);
- snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION,
- md.matches[i], 0, md.matches[i], 0);
+ if (strcmp(md.matches[i], "fglrx") == 0)
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION_FOR_FGLRX,
+ md.matches[i], 0, md.matches[i], 0);
+ else
+ snprintf(buf, sizeof(buf), BUILTIN_SCREEN_SECTION,
+ md.matches[i], 0, md.matches[i], 0);
AppendToConfig(buf);
}

View File

@ -0,0 +1,93 @@
From: Luc Verhaegen <lverhaegen@suse.de>
Handle 'Zap' - Ctrl-Alt-Backspace more gracefully
To avoid accidental zapping of the Xserver warn after
the first ctrl-alt-backspace by emitting a beep. Only
Zap the server if a second ctrl-alt-backspace is sent
within 2 seconds.
This can be enabled with a new option flag "ZapWarning"
Index: xorg-server-21.1.0/hw/xfree86/common/xf86Config.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/common/xf86Config.c
+++ xorg-server-21.1.0/hw/xfree86/common/xf86Config.c
@@ -621,6 +621,7 @@ configFiles(XF86ConfFilesPtr fileconf)
typedef enum {
FLAG_DONTVTSWITCH,
FLAG_DONTZAP,
+ FLAG_ZAPWARNING,
FLAG_DONTZOOM,
FLAG_DISABLEVIDMODE,
FLAG_ALLOWNONLOCAL,
@@ -657,6 +658,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_DONTZAP, "DontZap", OPTV_BOOLEAN,
{0}, FALSE},
+ { FLAG_ZAPWARNING, "ZapWarning", OPTV_BOOLEAN,
+ {0}, FALSE },
{FLAG_DONTZOOM, "DontZoom", OPTV_BOOLEAN,
{0}, FALSE},
{FLAG_DISABLEVIDMODE, "DisableVidModeExtension", OPTV_BOOLEAN,
@@ -739,6 +742,7 @@ configServerFlags(XF86ConfFlagsPtr flags
xf86GetOptValBool(FlagOptions, FLAG_DONTVTSWITCH, &xf86Info.dontVTSwitch);
xf86GetOptValBool(FlagOptions, FLAG_DONTZAP, &xf86Info.dontZap);
+ xf86GetOptValBool(FlagOptions, FLAG_ZAPWARNING, &xf86Info.ZapWarning);
xf86GetOptValBool(FlagOptions, FLAG_DONTZOOM, &xf86Info.dontZoom);
xf86GetOptValBool(FlagOptions, FLAG_IGNORE_ABI, &xf86Info.ignoreABI);
Index: xorg-server-21.1.0/hw/xfree86/common/xf86Events.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/common/xf86Events.c
+++ xorg-server-21.1.0/hw/xfree86/common/xf86Events.c
@@ -158,10 +158,22 @@ xf86ProcessActionEvent(ActionEvent actio
DebugF("ProcessActionEvent(%d,%p)\n", (int) action, arg);
switch (action) {
case ACTION_TERMINATE:
- if (!xf86Info.dontZap) {
- xf86Msg(X_INFO, "Server zapped. Shutting down.\n");
- GiveUp(0);
+ if (xf86Info.dontZap)
+ break;
+
+ if (xf86Info.ZapWarning) {
+ static struct timeval LastZap = { 0, 0};
+ struct timeval NewZap;
+
+ gettimeofday(&NewZap, NULL);
+
+ if ((NewZap.tv_sec - LastZap.tv_sec) >= 2) {
+ xf86OSRingBell(30, 1000, 50);
+ LastZap = NewZap;
+ break;
+ }
}
+ GiveUp(0);
break;
case ACTION_NEXT_MODE:
if (!xf86Info.dontZoom)
Index: xorg-server-21.1.0/hw/xfree86/common/xf86Globals.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/common/xf86Globals.c
+++ xorg-server-21.1.0/hw/xfree86/common/xf86Globals.c
@@ -107,6 +107,7 @@ xf86InfoRec xf86Info = {
.autoVTSwitch = TRUE,
.ShareVTs = FALSE,
.dontZap = FALSE,
+ .ZapWarning = TRUE,
.dontZoom = FALSE,
.currentScreen = NULL,
#ifdef CSRG_BASED
Index: xorg-server-21.1.0/hw/xfree86/common/xf86Privstr.h
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/common/xf86Privstr.h
+++ xorg-server-21.1.0/hw/xfree86/common/xf86Privstr.h
@@ -62,6 +62,7 @@ typedef struct {
Bool autoVTSwitch;
Bool ShareVTs;
Bool dontZap;
+ Bool ZapWarning;
Bool dontZoom;
/* graphics part */

8
README.updates Normal file
View File

@ -0,0 +1,8 @@
Xserver module update mechanism
-------------------------------
If any corresponding Xserver module is found below
"/usr/lib/xorg/modules/updates/" ("/usr/lib64/xorg/modules/updates/"
on biarch 32/64 bit platforms) it will be favored over the one in
"/usr/lib/xorg/modules/" ("/usr/lib64/xorg/modules/" on biarch 32/64
bit platforms).

View File

@ -0,0 +1,92 @@
From d1d9d4e5f8f9ac1d22e1258759d6ee9e49c7fe90 Mon Sep 17 00:00:00 2001
From: Egbert Eich <eich@freedesktop.org>
Date: Fri, 9 Apr 2010 15:10:32 +0200
Subject: [PATCH] Prevent XSync Alarms from senslessly calling CheckTrigger() when inactive.
If an XSync Alarm is set to inactive there is no need to check if a trigger
needs to fire. Doing so if the counter is the IdleCounter will put the
server on 100 percent CPU load since the select timeout is set to 0.
---
xorg-server-1.8.0/Xext/sync.c | 11 +++++++++--
xorg-server-1.8.0/Xext/syncsrv.h | 1 +
2 files changed, 10 insertions(+), 2 deletions(-)
Index: xorg-server-1.8.0/Xext/sync.c
===================================================================
--- xorg-server-1.8.0.orig/Xext/sync.c
+++ xorg-server-1.8.0/Xext/sync.c
@@ -518,6 +518,10 @@ SyncAlarmTriggerFired(SyncTrigger *pTrig
pAlarm->state = XSyncAlarmInactive;
}
}
+ /* Stop server from looping! */
+ if (pAlarm->state == XSyncAlarmInactive)
+ SyncDeleteTriggerFromCounter(&pAlarm->trigger);
+
/* The AlarmNotify event has to have the "new state of the alarm"
* which we can't be sure of until this point. However, it has
* to have the "old" trigger test value. That's the reason for
@@ -730,7 +734,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
XSyncCounter counter;
Mask origmask = mask;
- counter = pAlarm->trigger.pCounter ? pAlarm->trigger.pCounter->id : None;
+ counter = pAlarm->counter_id;
while (mask)
{
@@ -741,7 +745,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
case XSyncCACounter:
mask &= ~XSyncCACounter;
/* sanity check in SyncInitTrigger */
- counter = *values++;
+ counter = pAlarm->counter_id = *values++;
break;
case XSyncCAValueType:
@@ -808,6 +812,14 @@ SyncChangeAlarmAttributes(ClientPtr clie
return BadMatch;
}
}
+ if (pAlarm->state == XSyncAlarmInactive) {
+ /*
+ * If we are inactive the trigger has been deleted from the counter.
+ * Persuade SyncInitTrigger() to readd it.
+ */
+ origmask |= XSyncCACounter;
+ pAlarm->trigger.pCounter = NULL;
+ }
/* postpone this until now, when we're sure nothing else can go wrong */
if ((status = SyncInitTrigger(client, &pAlarm->trigger, counter,
@@ -815,6 +827,7 @@ SyncChangeAlarmAttributes(ClientPtr clie
return status;
/* XXX spec does not really say to do this - needs clarification */
+ /* It's the only place where it is set to XSyncAlarmActive! */
pAlarm->state = XSyncAlarmActive;
return Success;
}
@@ -1617,8 +1630,10 @@ ProcSyncCreateAlarm(ClientPtr client)
pAlarm->client = client;
pAlarm->alarm_id = stuff->id;
+ pAlarm->counter_id = None;
XSyncIntToValue(&pAlarm->delta, 1L);
pAlarm->events = TRUE;
+ /* SyncChangeAlarmAttributes() changes this - no need to set this here! */
pAlarm->state = XSyncAlarmInactive;
pAlarm->pEventClients = NULL;
status = SyncChangeAlarmAttributes(client, pAlarm, vmask,
Index: xorg-server-1.8.0/Xext/syncsrv.h
===================================================================
--- xorg-server-1.8.0.orig/Xext/syncsrv.h
+++ xorg-server-1.8.0/Xext/syncsrv.h
@@ -129,6 +129,7 @@ typedef struct _SyncAlarm {
int events;
int state;
SyncAlarmClientList *pEventClients;
+ XSyncCounter counter_id;
} SyncAlarm;
typedef struct {

View File

@ -0,0 +1,347 @@
From 0f70ba9d3412b17ac4e08e33e1be3c226c06ea54 Mon Sep 17 00:00:00 2001
From: Yan Li <yan.i.li@intel.com>
Date: Tue, 12 May 2009 17:49:07 +0800
Subject: [PATCH] XKB: cache xkbcomp output for fast start-up v5 for 1.6.1
Organization: Intel
xkbcomp outputs will be cached in files with hashed keymap as
names. This saves boot time for around 1s on commodity netbooks.
Signed-off-by: Yan Li <yan.i.li@intel.com>
================================================================================
--- xorg-server-1.7.99/configure.ac
+++ xorg-server-1.7.99/configure.ac
@@ -527,9 +527,9 @@
AC_ARG_WITH(xkb-path, AS_HELP_STRING([--with-xkb-path=PATH], [Path to XKB base dir (default: ${datadir}/X11/xkb)]),
[ XKBPATH="$withval" ],
[ XKBPATH="${datadir}/X11/xkb" ])
-AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${datadir}/X11/xkb/compiled)]),
+AC_ARG_WITH(xkb-output, AS_HELP_STRING([--with-xkb-output=PATH], [Path to XKB output dir (default: ${localstatedir}/cache/xkb)]),
[ XKBOUTPUT="$withval" ],
- [ XKBOUTPUT="compiled" ])
+ [ XKBOUTPUT="${localstatedir}/cache/xkb" ])
AC_ARG_WITH(default-xkb-rules, AS_HELP_STRING([--with-default-xkb-rules=RULES],
[Keyboard ruleset (default: base/evdev)]),
[ XKB_DFLT_RULES="$withval" ],
@@ -1160,7 +1160,7 @@
dnl Make sure XKM_OUTPUT_DIR is an absolute path
XKBOUTPUT_FIRSTCHAR=`echo $XKBOUTPUT | cut -b 1`
if [[ x$XKBOUTPUT_FIRSTCHAR != x/ -a x$XKBOUTPUT_FIRSTCHAR != 'x$' ]] ; then
- XKBOUTPUT="$XKB_BASE_DIRECTORY/$XKBOUTPUT"
+ AC_MSG_ERROR([xkb-output must be an absolute path.])
fi
dnl XKM_OUTPUT_DIR (used in code) must end in / or file names get hosed
--- xorg-server-1.7.99/xkb/README.compiled
+++ xorg-server-1.7.99/xkb/README.compiled
@@ -4,10 +4,10 @@
or some other tool might destroy or replace the files in this directory,
so it is not a safe place to store compiled keymaps for long periods of
time. The default keymap for any server is usually stored in:
- X<num>-default.xkm
-where <num> is the display number of the server in question, which makes
-it possible for several servers *on the same host* to share the same
-directory.
+ server-<SHA1>.xkm
+
+where <SHA1> is the SHA1 hash of keymap source, so that compiled
+keymap of different keymap sources are stored in different files.
Unless the X server is modified, sharing this directory between servers on
different hosts could cause problems.
--- xorg-server-1.9.0/xkb/ddxLoad.c.orig 2010-07-14 22:23:17.000000000 +0200
+++ xorg-server-1.9.0/xkb/ddxLoad.c 2010-08-23 15:23:47.000000000 +0200
@@ -30,6 +30,12 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#include <xkb-config.h>
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+# include <sha1.h>
+#else /* Use OpenSSL's libcrypto */
+# include <stddef.h> /* buggy openssl/sha.h wants size_t */
+# include <openssl/sha.h>
+#endif
#include <stdio.h>
#include <ctype.h>
#include <X11/X.h>
@@ -43,24 +49,13 @@ THE USE OR PERFORMANCE OF THIS SOFTWARE.
#define XKBSRV_NEED_FILE_FUNCS
#include <xkbsrv.h>
#include <X11/extensions/XI.h>
+#include <errno.h>
#include "xkb.h"
#if defined(CSRG_BASED) || defined(linux) || defined(__GNU__)
#include <paths.h>
#endif
- /*
- * If XKM_OUTPUT_DIR specifies a path without a leading slash, it is
- * relative to the top-level XKB configuration directory.
- * Making the server write to a subdirectory of that directory
- * requires some work in the general case (install procedure
- * has to create links to /var or somesuch on many machines),
- * so we just compile into /usr/tmp for now.
- */
-#ifndef XKM_OUTPUT_DIR
-#define XKM_OUTPUT_DIR "compiled/"
-#endif
-
#define PRE_ERROR_MSG "\"The XKEYBOARD keymap compiler (xkbcomp) reports:\""
#define ERROR_PREFIX "\"> \""
#define POST_ERROR_MSG1 "\"Errors from xkbcomp are not fatal to the X server\""
@@ -175,6 +170,45 @@ OutputDirectory(
}
static Bool
+Sha1Asc(char sha1Asc[SHA_DIGEST_LENGTH*2+1], const char * input)
+{
+ int i;
+ unsigned char sha1[SHA_DIGEST_LENGTH];
+
+#ifdef HAVE_SHA1_IN_LIBMD /* Use libmd for SHA1 */
+ SHA1_CTX ctx;
+
+ SHA1Init (&ctx);
+ SHA1Update (&ctx, input, strlen(input));
+ SHA1Final (sha1, &ctx);
+#else /* Use OpenSSL's libcrypto */
+ SHA_CTX ctx;
+ int success;
+
+ success = SHA1_Init (&ctx);
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Update (&ctx, input, strlen(input));
+ if (! success)
+ return BadAlloc;
+
+ success = SHA1_Final (sha1, &ctx);
+ if (! success)
+ return BadAlloc;
+#endif
+
+ /* convert sha1 to sha1_asc */
+ for(i=0; i<SHA_DIGEST_LENGTH; ++i) {
+ sprintf(sha1Asc+i*2, "%02X", sha1[i]);
+ }
+
+ return Success;
+}
+
+/* call xkbcomp and compile XKB keymap, return xkm file name in
+ nameRtrn */
+static Bool
XkbDDXCompileKeymapByNames( XkbDescPtr xkb,
XkbComponentNamesPtr names,
unsigned want,
@@ -183,7 +217,11 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
int nameRtrnLen)
{
FILE * out;
- char *buf = NULL, keymap[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * buf = NULL, xkmfile[PATH_MAX], xkm_output_dir[PATH_MAX];
+ char * tmpXkmFile = NULL;
+ char * canonicalXkmFileName = NULL;
+ char sha1Asc[SHA_DIGEST_LENGTH*2+1], xkbKeyMapBuf[100*1024];
+ int ret, result;
const char *emptystring = "";
char *xkbbasedirflag = NULL;
@@ -194,15 +232,70 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
/* WIN32 has no popen. The input must be stored in a file which is
used as input for xkbcomp. xkbcomp does not read from stdin. */
char tmpname[PATH_MAX];
- const char *xkmfile = tmpname;
+ const char *xkbfile = tmpname;
#else
- const char *xkmfile = "-";
+ const char *xkbfile = "-";
+#endif
+
+ /* Write keymap source (xkbfile) to memory buffer `xkbKeyMapBuf',
+ of which SHA1 is generated and used as result xkm file name */
+ memset(xkbKeyMapBuf, 0, sizeof(xkbKeyMapBuf));
+ out = fmemopen(xkbKeyMapBuf, sizeof(xkbKeyMapBuf), "w");
+ if (NULL == out) {
+ ErrorF("[xkb] Open xkbKeyMapBuf for writing failed\n");
+ return FALSE;
+ }
+ ret = XkbWriteXKBKeymapForNames(out, names, xkb, want, need);
+ if (fclose(out) !=0)
+ {
+ ErrorF("[xkb] XkbWriteXKBKeymapForNames error, perhaps xkbKeyMapBuf is too small\n");
+ return FALSE;
+ }
+#ifdef DEBUG
+ if (xkbDebugFlags) {
+ ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
+ fputs(xkbKeyMapBuf, stderr);
+ }
#endif
+ if (!ret) {
+ ErrorF("[xkb] Generating XKB Keymap failed, giving up compiling keymap\n");
+ return FALSE;
+ }
- snprintf(keymap, sizeof(keymap), "server-%s", display);
+ DebugF("[xkb] computing SHA1 of keymap\n");
+ if (Success == Sha1Asc(sha1Asc, xkbKeyMapBuf)) {
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", sha1Asc);
+ }
+ else {
+ ErrorF("[xkb] Computing SHA1 of keymap failed, "
+ "using display name instead as xkm file name\n");
+ snprintf(xkmfile, sizeof(xkmfile), "server-%s", display);
+ }
OutputDirectory(xkm_output_dir, sizeof(xkm_output_dir));
+ /* set nameRtrn, fail if it's too small */
+ if ((strlen(xkmfile)+1 > nameRtrnLen) && nameRtrn) {
+ ErrorF("[xkb] nameRtrn too small to hold xkmfile name\n");
+ return FALSE;
+ }
+ strncpy(nameRtrn, xkmfile, nameRtrnLen);
+
+ /* if the xkm file already exists, reuse it */
+ canonicalXkmFileName = Xprintf("%s%s.xkm", xkm_output_dir, xkmfile);
+ if (access(canonicalXkmFileName, R_OK) == 0) {
+ /* yes, we can reuse the old xkm file */
+ LogMessage(X_INFO, "XKB: reuse xkmfile %s\n", canonicalXkmFileName);
+ result = TRUE;
+ goto _ret;
+ }
+ LogMessage(X_INFO, "XKB: generating xkmfile %s\n", canonicalXkmFileName);
+
+ /* continue to call xkbcomp to compile the keymap. to avoid race
+ condition, we compile it to a tmpfile then rename it to
+ xkmfile */
+
+
#ifdef WIN32
strcpy(tmpname, Win32TempDir());
strcat(tmpname, "\\xkb_XXXXXX");
@@ -225,14 +318,20 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
}
}
+ if ( (tmpXkmFile = tempnam(xkm_output_dir, NULL)) == NULL ) {
+ ErrorF("[xkb] Can't generate temp xkm file name");
+ result = FALSE;
+ goto _ret;
+ }
+
buf = Xprintf("\"%s%sxkbcomp\" -w %d %s -xkm \"%s\" "
- "-em1 %s -emp %s -eml %s \"%s%s.xkm\"",
+ "-em1 %s -emp %s -eml %s \"%s\"",
xkbbindir, xkbbindirsep,
( (xkbDebugFlags < 2) ? 1 :
((xkbDebugFlags > 10) ? 10 : (int)xkbDebugFlags) ),
- xkbbasedirflag ? xkbbasedirflag : "", xkmfile,
+ xkbbasedirflag ? xkbbasedirflag : "", xkbfile,
PRE_ERROR_MSG, ERROR_PREFIX, POST_ERROR_MSG1,
- xkm_output_dir, keymap);
+ tmpXkmFile);
free(xkbbasedirflag);
@@ -240,7 +339,12 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
LogMessage(X_ERROR, "XKB: Could not invoke xkbcomp: not enough memory\n");
return FALSE;
}
-
+
+ /* there's a potential race condition between calling tempnam()
+ and invoking xkbcomp to write the result file (potential temp
+ file name conflicts), but since xkbcomp is a standalone
+ program, we have to live with this */
+
#ifndef WIN32
out= Popen(buf,"w");
#else
@@ -248,31 +352,42 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
#endif
if (out!=NULL) {
-#ifdef DEBUG
- if (xkbDebugFlags) {
- ErrorF("[xkb] XkbDDXCompileKeymapByNames compiling keymap:\n");
- XkbWriteXKBKeymapForNames(stderr,names,xkb,want,need);
- }
-#endif
- XkbWriteXKBKeymapForNames(out,names,xkb,want,need);
+ /* write XKBKeyMapBuf to xkbcomp */
+ if (EOF==fputs(xkbKeyMapBuf, out))
+ {
+ ErrorF("[xkb] Sending keymap to xkbcomp failed\n");
+ result = FALSE;
+ goto _ret;
+ }
#ifndef WIN32
if (Pclose(out)==0)
#else
if (fclose(out)==0 && System(buf) >= 0)
#endif
{
+ /* xkbcomp success */
if (xkbDebugFlags)
DebugF("[xkb] xkb executes: %s\n",buf);
- if (nameRtrn) {
- strncpy(nameRtrn,keymap,nameRtrnLen);
- nameRtrn[nameRtrnLen-1]= '\0';
+ /* if canonicalXkmFileName already exists now, we simply
+ overwrite it, this is OK */
+ ret = rename(tmpXkmFile, canonicalXkmFileName);
+ if (0 != ret) {
+ ErrorF("[xkb] Can't rename %s to %s, error: %s\n",
+ tmpXkmFile, canonicalXkmFileName,
+ strerror(errno));
+
+ /* in case of error, don't unlink tmpXkmFile, leave it
+ for debugging */
+
+ result = FALSE;
+ goto _ret;
}
- if (buf != NULL)
- free(buf);
- return TRUE;
+
+ result = TRUE;
+ goto _ret;
}
else
- LogMessage(X_ERROR, "Error compiling keymap (%s)\n", keymap);
+ LogMessage(X_ERROR, "Error compiling keymap (%s)\n", xkbfile);
#ifdef WIN32
/* remove the temporary file */
unlink(tmpname);
@@ -289,7 +404,17 @@ XkbDDXCompileKeymapByNames( XkbDescPtr
nameRtrn[0]= '\0';
if (buf != NULL)
free(buf);
- return FALSE;
+ result = FALSE;
+
+_ret:
+ if (tmpXkmFile)
+ free(tmpXkmFile);
+ if (canonicalXkmFileName)
+ xfree(canonicalXkmFileName);
+ if (buf != NULL)
+ xfree (buf);
+
+ return result;
}
static FILE *
@@ -373,7 +498,6 @@ unsigned missing;
DebugF("Loaded XKB keymap %s, defined=0x%x\n",fileName,(*xkbRtrn)->defined);
}
fclose(file);
- (void) unlink (fileName);
return (need|want)&(~missing);
}

58
b_sync-fix.patch Normal file
View File

@ -0,0 +1,58 @@
Index: xorg-server-1.12.1/Xext/sync.c
===================================================================
--- xorg-server-1.12.1.orig/Xext/sync.c
+++ xorg-server-1.12.1/Xext/sync.c
@@ -2615,9 +2615,43 @@ static XSyncValue *pIdleTimeValueGreater
static void
IdleTimeQueryValue(pointer pCounter, CARD64 * pValue_return)
{
- CARD32 idle = GetTimeInMillis() - lastDeviceEventTime.milliseconds;
+ static CARD32 previousLastDeviceEventTimeMilliseconds = 0;
+ CARD32 now = GetTimeInMillis();
+ CARD32 idle = now - lastDeviceEventTime.milliseconds;
+ CARD32 previousIdle = now - previousLastDeviceEventTimeMilliseconds;
+ SyncCounter *pIdleTimeCounter = (SyncCounter*)pCounter;
XSyncIntsToValue(pValue_return, idle, 0);
+ if (pCounter == NULL)
+ {
+ return;
+ }
+ if (previousLastDeviceEventTimeMilliseconds == 0)
+ {
+ /* initialize static var when this function is invoked the first time. */
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+ return;
+ }
+
+ if (previousLastDeviceEventTimeMilliseconds == lastDeviceEventTime.milliseconds)
+ {
+ /* no new user event, no need to change idle counter. */
+ return;
+ }
+ previousLastDeviceEventTimeMilliseconds = lastDeviceEventTime.milliseconds;
+
+ /*
+ * Some user event occured; now update idle counter with previous
+ * event time, so idle counter has the most up-to-date value with
+ * respect to previous user event (we need old and new counter
+ * value to compute if a transition occured). Recompute bracket
+ * values if this is system counter.
+ */
+
+ XSyncIntsToValue (&pIdleTimeCounter->value, previousIdle, 0);
+ if (IsSystemCounter(pIdleTimeCounter)) {
+ SyncComputeBracketValues(pIdleTimeCounter);
+ }
}
static void
@@ -2700,7 +2734,7 @@ IdleTimeWakeupHandler(pointer env, int r
if (!pIdleTimeValueLess && !pIdleTimeValueGreater)
return;
- IdleTimeQueryValue(NULL, &idle);
+ IdleTimeQueryValue(IdleTimeCounter, &idle);
if ((pIdleTimeValueGreater &&
XSyncValueGreaterOrEqual(idle, *pIdleTimeValueGreater)) ||

1
modesetting.ids Normal file
View File

@ -0,0 +1 @@
#

View File

@ -0,0 +1,38 @@
Author: Dirk Mueller <dmueller@suse.de>
Subject: Raise default client limit to 512
Patch-Mainline: Never
After a while of starting too many browser tabs, I ran into
xorg: Maximum number of clients reached
which also prevented me from starting a terminal window to debug
the issue.. so raise the default a bit. Based on
https://plug-discuss.phxlinux.narkive.com/BWkQ7Xez/xorg-maximum-number-of-clients-reached
it appears other distros are also doing that.
--- xorg-server-21.1.3.orig/include/misc.h
+++ xorg-server-21.1.3/include/misc.h
@@ -88,7 +88,7 @@ OF THIS SOFTWARE.
#define MAXGPUSCREENS 16
#endif
#define MAXCLIENTS 2048
-#define LIMITCLIENTS 256 /* Must be a power of 2 and <= MAXCLIENTS */
+#define LIMITCLIENTS 512 /* Must be a power of 2 and <= MAXCLIENTS */
#define MAXEXTENSIONS 128
#define MAXFORMATS 8
#ifndef MAXDEVICES
--- xorg-server-21.1.3.orig/man/Xserver.man
+++ xorg-server-21.1.3/man/Xserver.man
@@ -317,9 +317,9 @@ A value of zero makes the stack size as
of \-1 leaves the stack space limit unchanged.
.TP 8
.B \-maxclients
-.BR 64 | 128 | 256 | 512
+.BR 64 | 128 | 256 | 512 | 1024 | 2048
Set the maximum number of clients allowed to connect to the X server.
-Acceptable values are 64, 128, 256 or 512.
+Acceptable values are 64, 128, 256, 512, 1024 or 2048.
.TP 8
.B \-render
.BR default | mono | gray | color

View File

@ -0,0 +1,11 @@
--- xserver-1.20.9/hw/xfree86/xorg-wrapper.c.old 2020-09-30 12:25:12.757532000 +0200
+++ xserver-1.20.9/hw/xfree86/xorg-wrapper.c 2020-09-30 12:27:12.809554000 +0200
@@ -254,7 +254,7 @@ int main(int argc, char *argv[])
int i, r, fd;
int kms_cards = 0;
int total_cards = 0;
- int allowed = CONSOLE_ONLY;
+ int allowed = ANYBODY;
int needs_root_rights = -1;
char *const empty_envp[1] = { NULL, };

View File

@ -0,0 +1,20 @@
--- xserver-1.20.9/hw/xfree86/xorg-wrapper.c.old 2020-09-24 03:16:27.270885000 +0200
+++ xserver-1.20.9/hw/xfree86/xorg-wrapper.c 2020-09-24 03:18:42.047597000 +0200
@@ -375,7 +375,7 @@ int main(int argc, char *argv[])
}
}
- snprintf(buf, sizeof(buf), "%s/Xorg", SUID_WRAPPER_DIR);
+ snprintf(buf, sizeof(buf), "%s/Xorg.bin", SUID_WRAPPER_DIR);
/* Check if the server is executable by our real uid */
if (access(buf, X_OK) != 0) {
--- xserver-1.20.9/hw/xfree86/Xorg.sh.in.orig 2020-09-24 03:36:20.690412000 +0200
+++ xserver-1.20.9/hw/xfree86/Xorg.sh.in 2020-09-24 03:36:37.594497000 +0200
@@ -7,5 +7,5 @@
if [ -x "$basedir"/Xorg.wrap ]; then
exec "$basedir"/Xorg.wrap "$@"
else
- exec "$basedir"/Xorg "$@"
+ exec "$basedir"/Xorg.bin "$@"
fi

View File

@ -0,0 +1,345 @@
From 3216e0c618cc330f053ed36a749c8d8cfeb87a2f Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Fri, 17 Aug 2012 09:49:24 +1000
Subject: [PATCH] autobind GPUs to the screen, (v5)
this is racy and really not what we want for hotplug going forward,
but until DE support is in GNOME its probably for the best.
v2: fix if config or slave config is NULL
v3: fix multi useful slaves
v4: do not unbound GPUs before attaching them
compatibility fix for 5c7af02b10
-- Michal Srb <msrb@suse.com>
v5: Do not use xf86CrtcConfig, it is not filled by nvidia proprietary driver,
only use randr structures.
Auto configure outputs of additional GPUs on start, just like the outputs
of the main GPU are configured.
-- Michal Srb <msrb@suse.com>
DO NOT UPSTREAM.
Signed-off-by: Dave Airlie <airlied@gmail.com>
---
hw/xfree86/common/xf86Init.c | 12 ++++++++++++
hw/xfree86/common/xf86platformBus.c | 3 +++
hw/xfree86/modes/xf86Crtc.c | 32 ++++++++++++++++++++++++++++++++
3 files changed, 47 insertions(+)
Index: xorg-server-1.20.5/dix/main.c
===================================================================
--- xorg-server-1.20.5.orig/dix/main.c
+++ xorg-server-1.20.5/dix/main.c
@@ -122,6 +122,8 @@ extern void Dispatch(void);
CallbackListPtr RootWindowFinalizeCallback = NULL;
+CallbackListPtr RootWindowInitialized = NULL;
+
int
dix_main(int argc, char *argv[], char *envp[])
{
@@ -246,6 +248,8 @@ dix_main(int argc, char *argv[], char *e
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(screenInfo.screens[i]->root);
+ CallCallbacks(&RootWindowInitialized, NULL);
+
InitCoreDevices();
InitInput(argc, argv);
InitAndStartDevices();
Index: xorg-server-1.20.5/hw/xfree86/common/xf86Init.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86Init.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86Init.c
@@ -76,6 +76,7 @@
#include "xf86DDC.h"
#include "xf86Xinput.h"
#include "xf86InPriv.h"
+#include "xf86Crtc.h"
#include "picturestr.h"
#include "randrstr.h"
#include "glxvndabi.h"
@@ -294,6 +295,237 @@ AddVTAtoms(CallbackListPtr *pcbl, void *
"Failed to register VT properties\n");
}
+/*
+ * This function activates all outputs of all GPU screens associated with the
+ * given master screen and sets them to their preferred resolution next to
+ * each other left-to-right.
+ */
+static void
+xf86AutoConfigureProviderOutputsForMaster(ScreenPtr pMasterScreen)
+{
+ ScreenPtr pScreen;
+ rrScrPrivPtr pMasterScrPriv, pScrPriv;
+ RROutputPtr pOutput;
+ RRCrtcPtr pCrtc;
+ RRCrtcPtr *pUsedCrtcs;
+ int usedCrtcsCount;
+ int screenWidth, screenHeight, screenWidthMM, screenHeightMM;
+ int i, j, k, l;
+
+ struct OutputConfig {
+ RROutputPtr pOutput;
+ RRCrtcPtr pCrtc;
+
+ int x;
+ int y;
+ } *outputConfigs;
+ int outputConfigsCount = 0, outputConfigsUsed = 0;
+
+ if (!dixPrivateKeyRegistered(rrPrivKey))
+ return;
+
+ pMasterScrPriv = rrGetScrPriv(pMasterScreen);
+ if (!pMasterScrPriv)
+ return;
+
+ // Count the potential maximum of outputs that we will try to auto configure
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ pScreen = xf86GPUScreens[i]->pScreen;
+ if (pScreen->current_master != pMasterScreen || !pScreen->is_output_slave)
+ continue;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ continue;
+
+ outputConfigsCount += pScrPriv->numOutputs;
+ }
+
+ if (outputConfigsCount == 0)
+ return;
+
+ outputConfigs = calloc(outputConfigsCount, sizeof(*outputConfigs));
+
+ screenWidth = 0;
+ screenHeight = 0;
+
+ // Consider the master's own outputs/crtcs that were already configured
+ for (i = 0; i < pMasterScrPriv->numCrtcs; i++) {
+ if (!pMasterScrPriv->crtcs[i]->mode)
+ continue;
+
+ screenWidth = max(screenWidth, pMasterScrPriv->crtcs[i]->x + pMasterScrPriv->crtcs[i]->mode->mode.width);
+ screenHeight = max(screenHeight, pMasterScrPriv->crtcs[i]->y + pMasterScrPriv->crtcs[i]->mode->mode.height);
+ }
+
+ // Now add as many outputs from slave GPUs as we can next to it
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ pScreen = xf86GPUScreens[i]->pScreen;
+ if (pScreen->current_master != pMasterScreen || !pScreen->is_output_slave)
+ continue;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ continue;
+
+ pUsedCrtcs = calloc(pScrPriv->numCrtcs, sizeof(*pUsedCrtcs));
+ if (!pUsedCrtcs)
+ continue;
+
+ usedCrtcsCount = 0;
+
+ for (j = 0; j < pScrPriv->numOutputs; j++) {
+ pOutput = pScrPriv->outputs[j];
+
+ if (pOutput->connection != RR_Connected ||
+ pOutput->nonDesktop ||
+ pOutput->numModes == 0 ||
+ pOutput->numCrtcs == 0)
+ continue;
+
+ if (screenWidth + pOutput->modes[0]->mode.width > pMasterScrPriv->maxWidth ||
+ screenHeight + pOutput->modes[0]->mode.height > pMasterScrPriv->maxHeight)
+ {
+ // It can't fit into the maximal size, skip
+ continue;
+ }
+
+ for (k = 0; k < pOutput->numCrtcs; k++) {
+ pCrtc = pOutput->crtcs[k];
+ for (l = 0; l < usedCrtcsCount; l++) {
+ if (pCrtc == pUsedCrtcs[l]) {
+ pCrtc = NULL;
+ break;
+ }
+ }
+ if (pCrtc) {
+ break;
+ }
+ }
+
+ if (!pCrtc) {
+ // No more free CRTCs to setup this output, skip
+ continue;
+ }
+
+ pUsedCrtcs[usedCrtcsCount] = pCrtc;
+ usedCrtcsCount++;
+
+ assert(outputConfigsUsed < outputConfigsCount);
+ outputConfigs[outputConfigsUsed].pOutput = pOutput;
+ outputConfigs[outputConfigsUsed].pCrtc = pCrtc;
+ outputConfigs[outputConfigsUsed].x = screenWidth;
+ outputConfigs[outputConfigsUsed].y = 0;
+ outputConfigsUsed++;
+
+ screenWidth += pOutput->modes[0]->mode.width;
+ screenHeight += pOutput->modes[0]->mode.height;
+ }
+
+ free(pUsedCrtcs);
+ }
+
+ if (outputConfigsUsed == 0)
+ goto out;
+
+ if (screenWidth < pMasterScrPriv->minWidth)
+ screenWidth = pMasterScrPriv->minWidth;
+ if (screenHeight < pMasterScrPriv->minHeight)
+ screenHeight = pMasterScrPriv->minHeight;
+
+ if (pMasterScrPriv->mmWidth > 0 &&
+ pMasterScrPriv->mmHeight > 0 &&
+ pMasterScrPriv->width > 0 &&
+ pMasterScrPriv->height > 0)
+ {
+ // If the master screen already has some DPI, keep it
+ screenWidthMM = pMasterScrPriv->mmWidth * screenWidth / pMasterScreen->width;
+ screenHeightMM = pMasterScrPriv->mmHeight * screenHeight / pMasterScreen->height;
+ } else {
+ assert(outputConfigsUsed > 0);
+ // Otherwise use DPI of the first output
+ screenWidthMM = outputConfigs[0].pOutput->mmWidth * screenWidth / outputConfigs[0].pOutput->modes[0]->mode.width;
+ screenHeightMM = outputConfigs[0].pOutput->mmHeight * screenHeight / outputConfigs[0].pOutput->modes[0]->mode.height;
+ }
+
+ if (!RRScreenSizeSet(pMasterScreen, screenWidth, screenHeight, screenWidthMM, screenHeightMM))
+ goto out;
+
+ for (i = 0; i < outputConfigsUsed; i++) {
+ RRCrtcSet(
+ outputConfigs[i].pCrtc,
+ outputConfigs[i].pOutput->modes[0],
+ outputConfigs[i].x,
+ outputConfigs[i].y,
+ RR_Rotate_0,
+ 1,
+ &outputConfigs[i].pOutput
+ );
+ }
+
+out:
+ free(outputConfigs);
+}
+
+static void
+xf86AutoConfigProviderOutputs(CallbackListPtr *pcbl, void *data, void *call_data)
+{
+ int i;
+
+ for (i = 0; i < xf86NumScreens; i++) {
+ xf86AutoConfigureProviderOutputsForMaster(xf86Screens[i]->pScreen);
+ }
+}
+
+void
+xf86AutoConfigOutputDevice(ScreenPtr slave, ScreenPtr master)
+{
+ RRProviderPtr master_provider;
+ RRProviderPtr slave_provider;
+ rrScrPrivPtr master_rp;
+ rrScrPrivPtr slave_rp;
+
+ if (!dixPrivateKeyRegistered(rrPrivKey))
+ return;
+
+ master_rp = rrGetScrPriv(master);
+ slave_rp = rrGetScrPriv(slave);
+
+ if (!master_rp || !slave_rp)
+ return;
+
+ master_provider = master_rp->provider;
+ slave_provider = slave_rp->provider;
+
+ if (!master_provider || !slave_provider)
+ return;
+
+ if ((master_provider->capabilities & RR_Capability_SinkOffload) &&
+ (slave_provider->capabilities & RR_Capability_SourceOffload)) {
+ /* source offload */
+ AttachOffloadGPU(master, slave);
+ slave_provider->offload_sink = master_provider;
+ }
+ if ((master_provider->capabilities & RR_Capability_SourceOutput) &&
+ (slave_provider->capabilities & RR_Capability_SinkOutput)) {
+ /* sink offload */
+ AttachOutputGPU(master, slave);
+ slave_provider->output_source = master_provider;
+ }
+}
+
+static void
+xf86AutoConfigOutputDevices(void)
+{
+ int i;
+
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ xf86AutoConfigOutputDevice(xf86GPUScreens[i]->pScreen, xf86Screens[0]->pScreen);
+ }
+
+ AddCallback(&RootWindowInitialized, xf86AutoConfigProviderOutputs, NULL);
+}
+
static Bool
xf86ScreenInit(ScreenPtr pScreen, int argc, char **argv)
{
@@ -770,6 +996,8 @@ InitOutput(ScreenInfo * pScreenInfo, int
for (i = 0; i < xf86NumGPUScreens; i++)
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+ xf86AutoConfigOutputDevices();
+
xf86VGAarbiterWrapFunctions();
if (sigio_blocked)
input_unlock();
Index: xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/common/xf86platformBus.c
+++ xorg-server-1.20.5/hw/xfree86/common/xf86platformBus.c
@@ -594,6 +594,8 @@ xf86platformAddGPUDevices(DriverPtr drvp
return foundScreen;
}
+extern void xf86AutoConfigOutputDevice(ScreenPtr slave, ScreenPtr master);
+
int
xf86platformAddDevice(int index)
{
@@ -665,6 +667,7 @@ xf86platformAddDevice(int index)
}
/* attach unbound to 0 protocol screen */
AttachUnboundGPU(xf86Screens[0]->pScreen, xf86GPUScreens[i]->pScreen);
+ xf86AutoConfigOutputDevice(xf86GPUScreens[i]->pScreen, xf86Screens[0]->pScreen);
RRResourcesChanged(xf86Screens[0]->pScreen);
RRTellChanged(xf86Screens[0]->pScreen);
Index: xorg-server-1.20.5/include/dix.h
===================================================================
--- xorg-server-1.20.5.orig/include/dix.h
+++ xorg-server-1.20.5/include/dix.h
@@ -599,6 +599,8 @@ typedef struct {
extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback;
+extern _X_EXPORT CallbackListPtr RootWindowInitialized;
+
extern int
XItoCoreType(int xi_type);
extern Bool

60
pre_checkin.sh Normal file
View File

@ -0,0 +1,60 @@
#!/bin/sh
# pre_checking.sh
# Licensed under the same condition as the xorg-server.
# This script updates the .spec file (based on .spec.in) and inject versioned ABI Symbols from the X-Server,
# stored in a template file xorg-server-provides. The content of this file is verified during build, as the
# same script runs then again, extracting ABI versions from the source to be built. This ensures we can't
# publish a package with wrong ABI Versions being provided as part of the RPM Metadata.
# Driver-, Input and extension-packages are supposed to use the provided macros to ensure correct Requires.
# extract ABI Versions... this function is copied from configure.ac
extract_abi() {
grep ^.define.*${1}_VERSION ${xorg_src}/hw/xfree86/common/xf86Module.h | tr '(),' ' .' | awk '{ print $4$5 }'
}
if [ "$1" = "--tar" ]; then
tmpdir=$(mktemp -d)
tar xf "$2" -C ${tmpdir}
xorg_src=${tmpdir}/*
elif [ "$1" = "--verify" ]; then
xorg_src="$2"
prv_ext=".build"
else
echo "Wrong usage of this script"
echo "$0 can be started in two ways:"
echo "1: $0 --tar {xserver-xxxx.tar.xz}"
echo "2: $0 --verify {source-folder}"
echo "Variant 1 creates the file xorg-server-provides to be included in the src rpm"
echo "Variant 2 is being called during build to ensure the ABI provides match the expectations."
echo ""
echo ""
echo "Trying to guess the right tarball"
sh $0 --tar xorg-server-*.tar.xz
echo "... Please verify if the result makes sense"
exit 2
fi
abi_ansic=`extract_abi ANSIC`
abi_videodrv=`extract_abi VIDEODRV`
abi_xinput=`extract_abi XINPUT`
abi_extension=`extract_abi EXTENSION`
cat > xorg-server-provides${prv_ext} <<EOF
Provides: X11_ABI_XINPUT = ${abi_xinput}
Provides: X11_ABI_VIDEODRV = ${abi_videodrv}
Provides: X11_ABI_ANSIC = ${abi_ansic}
Provides: X11_ABI_EXTENSION = ${abi_extension}
EOF
if [ "$1" = "--tar" ]; then
if [ -d ${tmpdir} ]; then
rm -rf ${tmpdir}
fi
elif [ "$1" = "--verify" ]; then
diff "$3" xorg-server-provides${prv_ext}
if [ $? -gt 0 ]; then
echo "The ABI verification failed... please run $0 before checking in"
exit 1
fi
fi

View File

@ -0,0 +1,5 @@
## Type: string(Xorg)
## Path: Desktop/Display manager
## Default: "Xorg"
#
DISPLAYMANAGER_XSERVER="Xorg"

View File

@ -0,0 +1,109 @@
From: Keith Packard <keithp@keithp.com>
Date: Fri Oct 4 16:00:49 2013 -0700
Subject: [PATCH 1/2]Improved ConfineToShape
Patch-mainline: to be upstreamed
Git-commit: 0d0951624db7ae4686b362c7c6307f1ed46c8579
References: bnc#62146
Signed-off-by: Egbert Eich <eich@suse.com>
Find the box within the region which is closest to the point and move
there.
Signed-off-by: Keith Packard <keithp@keithp.com>
---
dix/events.c | 74 ++++++++++++++++++++++++++++++++++++++++--------------------
1 file changed, 50 insertions(+), 24 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index efaf91d..5244781 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -666,37 +666,63 @@ SetCriticalEvent(int event)
criticalEvents[event >> 3] |= 1 << (event & 7);
}
+static uint32_t
+ConfineToBox(int x, int y, BoxPtr box, int *px, int *py)
+{
+ int dx, dy;
+
+ *px = x;
+ *py = y;
+
+ if (*px < box->x1)
+ *px = box->x1;
+ else if (*px >= box->x2)
+ *px = box->x2 - 1;
+
+ if (*py < box->y1)
+ *py = box->y1;
+ else if (*py >= box->y2)
+ *py = box->y2 - 1;
+
+ dx = x - *px;
+ if (dx < 0) dx = -dx;
+ if (dx > 32767)
+ dx = 32767;
+ dy = y - *py;
+ if (dy < 0) dy = -dy;
+ if (dy > 32767)
+ dy = 32767;
+
+ return (uint32_t) dx * (uint32_t) dx + (uint32_t) dy * (uint32_t) dy;
+}
+
void
ConfineToShape(DeviceIntPtr pDev, RegionPtr shape, int *px, int *py)
{
- BoxRec box;
+ BoxPtr box;
+ int nbox;
int x = *px, y = *py;
- int incx = 1, incy = 1;
+ int bx, by;
+ uint32_t box_dist_2;
+ int best_x = 0, best_y = 0;
+ uint32_t best_dist_2 = 0;
+ int i;
- if (RegionContainsPoint(shape, x, y, &box))
+ if (RegionContainsPoint(shape, x, y, NULL))
return;
- box = *RegionExtents(shape);
- /* this is rather crude */
- do {
- x += incx;
- if (x >= box.x2) {
- incx = -1;
- x = *px - 1;
- }
- else if (x < box.x1) {
- incx = 1;
- x = *px;
- y += incy;
- if (y >= box.y2) {
- incy = -1;
- y = *py - 1;
- }
- else if (y < box.y1)
- return; /* should never get here! */
+ box = REGION_RECTS(shape);
+ nbox = REGION_NUM_RECTS(shape);
+ for (i = 0; i < nbox; i++) {
+ box_dist_2 = ConfineToBox(x, y, &box[i], &bx, &by);
+ if (i == 0 || box_dist_2 < best_dist_2) {
+ best_dist_2 = box_dist_2;
+ best_x = bx;
+ best_y = by;
}
- } while (!RegionContainsPoint(shape, x, y, &box));
- *px = x;
- *py = y;
+ }
+
+ *px = best_x;
+ *py = best_y;
}
static void

View File

@ -0,0 +1,148 @@
From: Egbert Eich <eich@freedesktop.org>
Date: Fri Feb 7 09:19:45 2014 +0100
Subject: [PATCH 2/2]DIX/ConfineTo: Don't bother about the bounding box when grabbing a shaped window
Patch-mainline: to be upstreamed
Git-commit: 3f7cc03e47a35d05ffb3f7a6de521c41638b4c7a
References: bnc#62146
Signed-off-by: Egbert Eich <eich@suse.com>
Limiting the the cursor coordinates on the bounding box of a shaped
window before applying ConfineTo leads to strange cursor placement
when the pointer is located outside the vertial and horizontal
strip of this bounding box.
Ignoring the bounding box when a shape is set leads to the correct
behavior.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
Reviewed-by: Keith Packard <keithp@keithp.com>
---
dix/events.c | 78 +++++++++++++++++++++++++++++++++---------------------------
1 file changed, 43 insertions(+), 35 deletions(-)
diff --git a/dix/events.c b/dix/events.c
index 5244781..8aa4af7 100644
--- a/dix/events.c
+++ b/dix/events.c
@@ -753,17 +753,19 @@ CheckPhysLimits(DeviceIntPtr pDev, CursorPtr cursor, Bool generateEvents,
(*pScreen->ConstrainCursor) (pDev, pScreen, &pSprite->physLimits);
}
- /* constrain the pointer to those limits */
- if (new.x < pSprite->physLimits.x1)
- new.x = pSprite->physLimits.x1;
- else if (new.x >= pSprite->physLimits.x2)
- new.x = pSprite->physLimits.x2 - 1;
- if (new.y < pSprite->physLimits.y1)
- new.y = pSprite->physLimits.y1;
- else if (new.y >= pSprite->physLimits.y2)
- new.y = pSprite->physLimits.y2 - 1;
if (pSprite->hotShape)
ConfineToShape(pDev, pSprite->hotShape, &new.x, &new.y);
+ else {
+ /* constrain the pointer to those limits */
+ if (new.x < pSprite->physLimits.x1)
+ new.x = pSprite->physLimits.x1;
+ else if (new.x >= pSprite->physLimits.x2)
+ new.x = pSprite->physLimits.x2 - 1;
+ if (new.y < pSprite->physLimits.y1)
+ new.y = pSprite->physLimits.y1;
+ else if (new.y >= pSprite->physLimits.y2)
+ new.y = pSprite->physLimits.y2 - 1;
+ }
if ((
#ifdef PANORAMIX
noPanoramiXExtension &&
@@ -914,7 +916,8 @@ ConfineCursorToWindow(DeviceIntPtr pDev, WindowPtr pWin, Bool generateEvents,
return;
}
#endif
- pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
+// if (!wBoundingShape(pWin))
+ pSprite->hotLimits = *RegionExtents(&pWin->borderSize);
pSprite->hotShape = wBoundingShape(pWin) ? &pWin->borderSize
: NullRegion;
CheckPhysLimits(pDev, pSprite->current, generateEvents,
@@ -3039,17 +3042,19 @@ CheckMotion(DeviceEvent *ev, DeviceIntPtr pDev)
pSprite->hot.x = ev->root_x;
pSprite->hot.y = ev->root_y;
- if (pSprite->hot.x < pSprite->physLimits.x1)
- pSprite->hot.x = pSprite->physLimits.x1;
- else if (pSprite->hot.x >= pSprite->physLimits.x2)
- pSprite->hot.x = pSprite->physLimits.x2 - 1;
- if (pSprite->hot.y < pSprite->physLimits.y1)
- pSprite->hot.y = pSprite->physLimits.y1;
- else if (pSprite->hot.y >= pSprite->physLimits.y2)
- pSprite->hot.y = pSprite->physLimits.y2 - 1;
if (pSprite->hotShape)
ConfineToShape(pDev, pSprite->hotShape, &pSprite->hot.x,
&pSprite->hot.y);
+ else {
+ if (pSprite->hot.x < pSprite->physLimits.x1)
+ pSprite->hot.x = pSprite->physLimits.x1;
+ else if (pSprite->hot.x >= pSprite->physLimits.x2)
+ pSprite->hot.x = pSprite->physLimits.x2 - 1;
+ if (pSprite->hot.y < pSprite->physLimits.y1)
+ pSprite->hot.y = pSprite->physLimits.y1;
+ else if (pSprite->hot.y >= pSprite->physLimits.y2)
+ pSprite->hot.y = pSprite->physLimits.y2 - 1;
+ }
pSprite->hotPhys = pSprite->hot;
if ((pSprite->hotPhys.x != ev->root_x) ||
@@ -3516,17 +3521,18 @@ XineramaWarpPointer(ClientPtr client)
x += stuff->dstX;
y += stuff->dstY;
- if (x < pSprite->physLimits.x1)
- x = pSprite->physLimits.x1;
- else if (x >= pSprite->physLimits.x2)
- x = pSprite->physLimits.x2 - 1;
- if (y < pSprite->physLimits.y1)
- y = pSprite->physLimits.y1;
- else if (y >= pSprite->physLimits.y2)
- y = pSprite->physLimits.y2 - 1;
if (pSprite->hotShape)
ConfineToShape(PickPointer(client), pSprite->hotShape, &x, &y);
-
+ else {
+ if (x < pSprite->physLimits.x1)
+ x = pSprite->physLimits.x1;
+ else if (x >= pSprite->physLimits.x2)
+ x = pSprite->physLimits.x2 - 1;
+ if (y < pSprite->physLimits.y1)
+ y = pSprite->physLimits.y1;
+ else if (y >= pSprite->physLimits.y2)
+ y = pSprite->physLimits.y2 - 1;
+ }
XineramaSetCursorPosition(PickPointer(client), x, y, TRUE);
return Success;
@@ -3619,16 +3625,18 @@ ProcWarpPointer(ClientPtr client)
y = newScreen->height - 1;
if (newScreen == pSprite->hotPhys.pScreen) {
- if (x < pSprite->physLimits.x1)
- x = pSprite->physLimits.x1;
- else if (x >= pSprite->physLimits.x2)
- x = pSprite->physLimits.x2 - 1;
- if (y < pSprite->physLimits.y1)
- y = pSprite->physLimits.y1;
- else if (y >= pSprite->physLimits.y2)
- y = pSprite->physLimits.y2 - 1;
if (pSprite->hotShape)
ConfineToShape(dev, pSprite->hotShape, &x, &y);
+ else {
+ if (x < pSprite->physLimits.x1)
+ x = pSprite->physLimits.x1;
+ else if (x >= pSprite->physLimits.x2)
+ x = pSprite->physLimits.x2 - 1;
+ if (y < pSprite->physLimits.y1)
+ y = pSprite->physLimits.y1;
+ else if (y >= pSprite->physLimits.y2)
+ y = pSprite->physLimits.y2 - 1;
+ }
(*newScreen->SetCursorPosition) (dev, newScreen, x, y, TRUE);
}
else if (!PointerConfinedToScreen(dev)) {

View File

@ -0,0 +1,46 @@
From: Egbert Eich <eich@suse.de>
Date: Fri Jan 15 16:52:18 2016 +0100
Subject: [PATCH]Panning: Set panning state in xf86RandR12ScreenSetSize()
Patch-mainline: to be upstreamed
References: boo#771521
Signed-off-by: Egbert Eich <eich@suse.com>
Right after verifying the panning area the per-crtc panning state should
be set.
This fixes panning when set in the configuration.
Bugzilla: https://bugzilla.suse.com/show_bug.cgi?id=771521
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/modes/xf86RandR12.c | 3 +++
1 file changed, 3 insertions(+)
Index: xorg-server-1.20.5/hw/xfree86/modes/xf86RandR12.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/modes/xf86RandR12.c
+++ xorg-server-1.20.5/hw/xfree86/modes/xf86RandR12.c
@@ -685,6 +685,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
WindowPtr pRoot = pScreen->root;
PixmapPtr pScrnPix;
Bool ret = FALSE;
+ Bool panning = FALSE;
int c;
if (randrp->virtualX == -1 || randrp->virtualY == -1) {
@@ -713,6 +714,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
if (crtc->panningTrackingArea.y2 > crtc->panningTrackingArea.y1)
crtc->panningTrackingArea.y2 += height - pScreen->height;
xf86RandR13VerifyPanningArea(crtc, width, height);
+ panning = panning ? TRUE : PANNING_ENABLED (crtc);
xf86RandR13Pan(crtc, randrp->pointerX, randrp->pointerY);
}
}
@@ -722,6 +724,7 @@ xf86RandR12ScreenSetSize(ScreenPtr pScre
pScreen->height = pScrnPix->drawable.height = height;
randrp->mmWidth = pScreen->mmWidth = mmWidth;
randrp->mmHeight = pScreen->mmHeight = mmHeight;
+ randrp->panning = panning;
xf86SetViewport(pScreen, pScreen->width - 1, pScreen->height - 1);
xf86SetViewport(pScreen, 0, 0);

View File

@ -0,0 +1,224 @@
From 44a643812ce3c07cd38972abfa9dbd163529c192 Mon Sep 17 00:00:00 2001
From: Matthias Gerstner <mgerstner@suse.de>
Date: Thu, 13 Jul 2017 14:58:04 +0200
Subject: [PATCH] Use better fallbacks to generate cookies if arc4random_buf(3)
is unavailable
References: bsc#1025084
If arc4random_buf() is not available for generating cookies:
- use getentropy(), if available (which was only recently added to
glibc)
- use getrandom() via syscall(), if available (there was no glibc
wrapper for this syscall for a long time)
- if all else fails, directly read from /dev/urandom as before, but
employ O_CLOEXEC, do an OsAbort() in case the random data couldn't be
read to avoid unsecure situations. Don't know if that's too hard a
measure but it shouldn't actually occur except on maximum number of
FDs reached
Reviewed-by: Stefan Dirsch <sndirsch@suse.de>
---
configure.ac | 4 +-
include/dix-config.h.in | 6 +++
os/auth.c | 138 ++++++++++++++++++++++++++++++++++++++++++++++--
3 files changed, 141 insertions(+), 7 deletions(-)
Index: xorg-server-21.1.9/configure.ac
===================================================================
--- xorg-server-21.1.9.orig/configure.ac
+++ xorg-server-21.1.9/configure.ac
@@ -132,7 +132,7 @@ AM_CONDITIONAL(SPECIAL_DTRACE_OBJECTS, [
AC_HEADER_DIRENT
AC_HEADER_STDC
AC_CHECK_HEADERS([fcntl.h stdlib.h string.h unistd.h dlfcn.h stropts.h \
- fnmatch.h sys/mkdev.h sys/sysmacros.h sys/utsname.h])
+ fnmatch.h sys/mkdev.h sys/sysmacros.h sys/utsname.h sys/syscall.h])
dnl Checks for typedefs, structures, and compiler characteristics.
AC_C_CONST
Index: xorg-server-21.1.9/include/dix-config.h.in
===================================================================
--- xorg-server-21.1.9.orig/include/dix-config.h.in
+++ xorg-server-21.1.9/include/dix-config.h.in
@@ -149,6 +149,9 @@
/* Define to 1 if you have the `arc4random_buf' function. */
#undef HAVE_ARC4RANDOM_BUF
+/* Define to 1 if you have the `getentropy' function. */
+#undef HAVE_GETENTROPY
+
/* Define to use libc SHA1 functions */
#undef HAVE_SHA1_IN_LIBC
@@ -226,6 +229,9 @@
/* Define to 1 if you have the <sys/utsname.h> header file. */
#undef HAVE_SYS_UTSNAME_H
+/* Define to 1 if you have the <sys/syscall.h> header file. */
+#undef HAVE_SYS_SYSCALL_H
+
/* Define to 1 if you have the `timingsafe_memcmp' function. */
#undef HAVE_TIMINGSAFE_MEMCMP
Index: xorg-server-21.1.9/os/auth.c
===================================================================
--- xorg-server-21.1.9.orig/os/auth.c
+++ xorg-server-21.1.9/os/auth.c
@@ -34,6 +34,10 @@ from The Open Group.
#ifdef HAVE_DIX_CONFIG_H
#include <dix-config.h>
#endif
+#include <errno.h>
+#ifdef HAVE_SYS_SYSCALL_H
+#include <syscall.h>
+#endif
#include <X11/X.h>
#include <X11/Xauth.h>
@@ -308,16 +312,140 @@ GenerateAuthorization(unsigned name_leng
#endif /* XCSECURITY */
+#if ! defined(HAVE_ARC4RANDOM_BUF)
+
+// fallback function to get random data directly from /dev/urandom
+
+static int
+GetUrandom ( char *buffer, size_t length )
+{
+ int random_fd = -1;
+ int res = -1;
+ size_t filled = 0;
+
+ // larger requests are typically rejected by getentropy() / getrandom()
+ // because they could block or return partially filled buffers
+ if( length > 256 ) {
+ errno = EIO;
+ return -1;
+ }
+
+ random_fd = open("/dev/urandom", O_RDONLY | O_CLOEXEC);
+
+ if( random_fd == -1 ) {
+ return -1;
+ }
+
+ while( filled < length ) {
+ res = read(random_fd, (char*)buffer + filled, length - filled);
+
+ if( res == -1 ) {
+ // shouldn't actually happen acc. to man(4) random,
+ // but you never know
+ if( errno == EINTR ) {
+ continue;
+ }
+
+ res = errno;
+ close(random_fd);
+ errno = res;
+ return -1;
+ }
+ else if( res == 0 ) {
+ close(random_fd);
+ // no more bytes available? should not happen
+ errno = EIO;
+ return -1;
+ }
+
+ filled += res;
+ }
+
+ close(random_fd);
+
+ return 0;
+}
+
+#endif // ! defined(HAVE_ARC4RANDOM_BUF)
+
+#if !defined(HAVE_GETENTROPY) && defined(HAVE_SYS_SYSCALL_H) && defined(SYS_getrandom)
+# define TRY_GETRANDOM
+#endif
+
+#ifdef TRY_GETRANDOM
+
+/*
+ * wrapper for the getrandom() syscall which was for a long time implemented
+ * in the Linux kernel, but not wrapped in glibc
+ */
+static int
+GetRandom ( char *buffer, size_t length )
+{
+ int res;
+ size_t filled = 0;
+
+ // larger requests are typically rejected by getentropy() / getrandom()
+ // because they could block or return partially filled buffers
+ if( length > 256 )
+ {
+ errno = EIO;
+ return -1;
+ }
+
+ while( filled < length )
+ {
+ /*
+ * glibc does not contain a syscall wrapper for this in older
+ * versions
+ */
+ res = syscall(SYS_getrandom, (char*)buffer + filled, length - filled, 0);
+
+ if( res == -1 )
+ {
+ if( errno == EINTR ) {
+ continue;
+ }
+
+ return -1;
+ }
+ else if( res == 0 )
+ {
+ // no more bytes available? should not happen
+ errno = EIO;
+ return -1;
+ }
+
+ filled += res;
+ }
+
+ return 0;
+}
+
+#endif /* TRY_GETRANDOM */
+
void
GenerateRandomData(int len, char *buf)
{
#ifdef HAVE_ARC4RANDOM_BUF
arc4random_buf(buf, len);
#else
- int fd;
+ int ret = -1;
+# ifdef HAVE_GETENTROPY
+ /* use getentropy instead */
+ ret = getentropy (buf, len);
+# elif defined(TRY_GETRANDOM)
+ /* try getrandom() wrapper */
+ ret = GetRandom(buf, len);
+# endif
+
+ if( ret == -1 ) {
+ // fallback to manual reading of /dev/urandom
+ ret = GetUrandom(buf, len);
+ }
- fd = open("/dev/urandom", O_RDONLY);
- read(fd, buf, len);
- close(fd);
-#endif
+ if( ret == -1 ) {
+ // no error return possible, rather abort than have security problems
+ OsAbort();
+ }
+#endif // HAVE_ARC4RANDOM_BUF
}

View File

@ -0,0 +1,17 @@
mi/miscrinit.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: xorg-server-21.1.4/mi/miscrinit.c
===================================================================
--- xorg-server-21.1.4.orig/mi/miscrinit.c
+++ xorg-server-21.1.4/mi/miscrinit.c
@@ -121,7 +121,9 @@ miModifyPixmapHeader(PixmapPtr pPixmap,
static Bool
miCloseScreen(ScreenPtr pScreen)
{
- return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate));
+ if (pScreen->devPrivate)
+ return ((*pScreen->DestroyPixmap) ((PixmapPtr) pScreen->devPrivate));
+ return TRUE;
}
static Bool

View File

@ -0,0 +1,164 @@
From 7d2802f13eecb38babeeb54ceae978a409b5c5d4 Mon Sep 17 00:00:00 2001
From: Patrik Jakobsson <patrik.r.jakobsson@gmail.com>
Date: Wed, 9 Jun 2021 20:58:59 +0200
Subject: [PATCH] modesetting: Fix dirty updates for sw rotation
Patch-Mainline: To be upstreamed
References: bsc#1182955
Rotation is broken for all drm drivers not providing hardware rotation
support. Drivers that give direct access to vram and not needing dirty
updates still work but only by accident. The problem is caused by
modesetting not sending the correct fb_id to drmModeDirtyFB() and
passing the damage rects in the rotated state and not as the crtc
expects them. This patch takes care of both problems.
Signed-off-by: Patrik Jakobsson <pjakobsson@suse.de>
---
hw/xfree86/drivers/modesetting/driver.c | 81 ++++++++++++++-----
.../drivers/modesetting/drmmode_display.c | 2 +-
.../drivers/modesetting/drmmode_display.h | 2 +
3 files changed, 63 insertions(+), 22 deletions(-)
Index: xorg-server-21.1.0/hw/xfree86/drivers/modesetting/driver.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/drivers/modesetting/driver.c
+++ xorg-server-21.1.0/hw/xfree86/drivers/modesetting/driver.c
@@ -515,9 +515,41 @@ GetRec(ScrnInfoPtr pScrn)
return TRUE;
}
+static void
+rotate_clip(PixmapPtr pixmap, BoxPtr rect, drmModeClip *clip, Rotation rotation)
+{
+ int w = pixmap->drawable.width;
+ int h = pixmap->drawable.height;
+
+ if (rotation == RR_Rotate_90) {
+ /* Rotate 90 degrees counter clockwise */
+ clip->x1 = rect->y1;
+ clip->x2 = rect->y2;
+ clip->y1 = w - rect->x2;
+ clip->y2 = w - rect->x1;
+ } else if (rotation == RR_Rotate_180) {
+ /* Rotate 180 degrees */
+ clip->x1 = w - rect->x2;
+ clip->x2 = w - rect->x1;
+ clip->y1 = h - rect->y2;
+ clip->y2 = h - rect->y1;
+ } else if (rotation == RR_Rotate_270) {
+ /* Rotate 90 degrees clockwise */
+ clip->x1 = h - rect->y2;
+ clip->x2 = h - rect->y1;
+ clip->y1 = rect->x1;
+ clip->y2 = rect->x2;
+ } else {
+ clip->x1 = rect->x1;
+ clip->x2 = rect->x2;
+ clip->y1 = rect->y1;
+ clip->y2 = rect->y2;
+ }
+}
+
static int
-dispatch_dirty_region(ScrnInfoPtr scrn,
- PixmapPtr pixmap, DamagePtr damage, int fb_id)
+dispatch_dirty_region(ScrnInfoPtr scrn, xf86CrtcPtr crtc,
+ PixmapPtr pixmap, DamagePtr damage, int fb_id)
{
modesettingPtr ms = modesettingPTR(scrn);
RegionPtr dirty = DamageRegion(damage);
@@ -532,13 +564,9 @@ dispatch_dirty_region(ScrnInfoPtr scrn,
if (!clip)
return -ENOMEM;
- /* XXX no need for copy? */
- for (i = 0; i < num_cliprects; i++, rect++) {
- clip[i].x1 = rect->x1;
- clip[i].y1 = rect->y1;
- clip[i].x2 = rect->x2;
- clip[i].y2 = rect->y2;
- }
+ /* Rotate and copy rects into clips */
+ for (i = 0; i < num_cliprects; i++, rect++)
+ rotate_clip(pixmap, rect, &clip[i], crtc->rotation);
/* TODO query connector property to see if this is needed */
ret = drmModeDirtyFB(ms->fd, fb_id, clip, num_cliprects);
@@ -561,20 +589,31 @@ static void
dispatch_dirty(ScreenPtr pScreen)
{
ScrnInfoPtr scrn = xf86ScreenToScrn(pScreen);
+ xf86CrtcConfigPtr xf86_config = XF86_CRTC_CONFIG_PTR(scrn);
modesettingPtr ms = modesettingPTR(scrn);
PixmapPtr pixmap = pScreen->GetScreenPixmap(pScreen);
- int fb_id = ms->drmmode.fb_id;
- int ret;
+ uint32_t fb_id;
+ int ret, c, x, y ;
- ret = dispatch_dirty_region(scrn, pixmap, ms->damage, fb_id);
- if (ret == -EINVAL || ret == -ENOSYS) {
- ms->dirty_enabled = FALSE;
- DamageUnregister(ms->damage);
- DamageDestroy(ms->damage);
- ms->damage = NULL;
- xf86DrvMsg(scrn->scrnIndex, X_INFO,
- "Disabling kernel dirty updates, not required.\n");
- return;
+ for (c = 0; c < xf86_config->num_crtc; c++) {
+ xf86CrtcPtr crtc = xf86_config->crtc[c];
+ drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
+
+ if (!drmmode_crtc)
+ continue;
+
+ drmmode_crtc_get_fb_id(crtc, &fb_id, &x, &y);
+
+ ret = dispatch_dirty_region(scrn, crtc, pixmap, ms->damage, fb_id);
+ if (ret == -EINVAL || ret == -ENOSYS) {
+ ms->dirty_enabled = FALSE;
+ DamageUnregister(ms->damage);
+ DamageDestroy(ms->damage);
+ ms->damage = NULL;
+ xf86DrvMsg(scrn->scrnIndex, X_INFO,
+ "Disabling kernel dirty updates, not required.\n");
+ return;
+ }
}
}
@@ -586,7 +625,7 @@ dispatch_dirty_pixmap(ScrnInfoPtr scrn,
DamagePtr damage = ppriv->secondary_damage;
int fb_id = ppriv->fb_id;
- dispatch_dirty_region(scrn, ppix, damage, fb_id);
+ dispatch_dirty_region(scrn, crtc, ppix, damage, fb_id);
}
static void
Index: xorg-server-21.1.0/hw/xfree86/drivers/modesetting/drmmode_display.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/drivers/modesetting/drmmode_display.c
+++ xorg-server-21.1.0/hw/xfree86/drivers/modesetting/drmmode_display.c
@@ -627,7 +627,7 @@ drmmode_crtc_can_test_mode(xf86CrtcPtr c
return ms->atomic_modeset;
}
-static Bool
+Bool
drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t *fb_id, int *x, int *y)
{
drmmode_crtc_private_ptr drmmode_crtc = crtc->driver_private;
Index: xorg-server-21.1.0/hw/xfree86/drivers/modesetting/drmmode_display.h
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/drivers/modesetting/drmmode_display.h
+++ xorg-server-21.1.0/hw/xfree86/drivers/modesetting/drmmode_display.h
@@ -311,6 +311,8 @@ void drmmode_copy_fb(ScrnInfoPtr pScrn,
int drmmode_crtc_flip(xf86CrtcPtr crtc, uint32_t fb_id, uint32_t flags, void *data);
+Bool drmmode_crtc_get_fb_id(xf86CrtcPtr crtc, uint32_t *fb_id, int *x, int *y);
+
void drmmode_set_dpms(ScrnInfoPtr scrn, int PowerManagementMode, int flags);
void drmmode_crtc_set_vrr(xf86CrtcPtr crtc, Bool enabled);

10
u_no-lto-for-tests.patch Normal file
View File

@ -0,0 +1,10 @@
--- xserver-1.20.10/test/Makefile.am.orig 2021-03-02 23:46:49.137916000 +0100
+++ xserver-1.20.10/test/Makefile.am 2021-03-02 23:47:48.691663000 +0100
@@ -105,6 +105,7 @@ tests_LDFLAGS = \
-Wl,-wrap,XISetEventMask \
-Wl,-wrap,AddResource \
-Wl,-wrap,GrabButton \
+ -fno-lto \
$()
endif XORG

View File

@ -0,0 +1,112 @@
From: Egbert Eich <eich@freedesktop.org>
Date: Fri Jan 29 11:05:46 2016 +0100
Subject: [PATCH]os/connections: Check for stale FDs
Patch-mainline: to be upstreamed
Git-repo: git://anongit.freedesktop.org/git/xorg/xserver
References: bsc#954433
Signed-off-by: Egbert Eich <eich@suse.com>
So far we've only checked for stale client connections.
However, our main select loop checks file descriptors
of devices and sockets of services like dbus.
These file descriptors may become stale as well, for instance,
when the underlying service has died. In this case, select
will return immediately with EBADF. Without removing these
stale FDs, the Xserver will loop rapidly in WaitFor().
Thus, simply remove the respective bit from AllSockets.
Signed-off-by: Egbert Eich <eich@freedesktop.org>
---
include/os.h | 3 +++
os/WaitFor.c | 5 +++++
os/connection.c | 37 +++++++++++++++++++++++++++++++++++++
3 files changed, 45 insertions(+)
diff --git a/include/os.h b/include/os.h
index 461d5d6..a3e433c 100644
--- a/include/os.h
+++ b/include/os.h
@@ -51,6 +51,7 @@ SOFTWARE.
#include <stdarg.h>
#include <stdint.h>
#include <string.h>
+#include <sys/select.h>
#define SCREEN_SAVER_ON 0
#define SCREEN_SAVER_OFF 1
@@ -141,6 +142,8 @@ extern _X_EXPORT const char *ClientAuthorized(ClientPtr /*client */ ,
extern _X_EXPORT void CheckConnections(void);
+extern _X_EXPORT void CheckFDs(fd_set *);
+
extern _X_EXPORT void CloseDownConnection(ClientPtr /*client */ );
extern _X_EXPORT void AddGeneralSocket(int /*fd */ );
diff --git a/os/WaitFor.c b/os/WaitFor.c
index e839d61..6cc967e 100644
--- a/os/WaitFor.c
+++ b/os/WaitFor.c
@@ -229,7 +229,12 @@ WaitForSomething(int *pClientsReady)
return 0;
if (i < 0) {
if (selecterr == EBADF) { /* Some client disconnected */
+ fd_set mask;
+ XFD_COPYSET(&LastSelectMask, &mask);
+ XFD_UNSET(&mask, &AllClients);
CheckConnections();
+ if (XFD_ANYSET(&mask))
+ CheckFDs(&mask);
if (!XFD_ANYSET(&AllClients))
return 0;
}
diff --git a/os/connection.c b/os/connection.c
index 4c1ba4b..d6943f2 100644
--- a/os/connection.c
+++ b/os/connection.c
@@ -1022,6 +1022,43 @@ CheckConnections(void)
}
/*****************
+ * CheckFDs
+ *****************/
+void
+CheckFDs(fd_set *fdbits)
+{
+ fd_mask mask;
+ fd_set tmask;
+ int curbit, curoff;
+ int i;
+ struct timeval notime;
+ int r;
+ notime.tv_sec = 0;
+ notime.tv_usec = 0;
+
+ for (i = 0; i < howmany(XFD_SETSIZE, NFDBITS); i++) {
+ mask = fdbits->fds_bits[i];
+ while (mask) {
+ curoff = mffs(mask) - 1;
+ curbit = curoff + (i * (sizeof(fd_mask) * 8));
+ FD_ZERO(&tmask);
+ FD_SET(curbit, &tmask);
+ do {
+ r = Select(curbit + 1, &tmask, NULL, NULL, &notime);
+ } while (r < 0 && (errno == EINTR || errno == EAGAIN));
+ if (r < 0 && errno == EBADF) {
+ //RemoveNotifyFd(curbit);
+ FD_CLR(curbit, &EnabledDevices);
+ FD_CLR(curbit, &AllSockets);
+ if (GrabInProgress)
+ FD_CLR(curbit, &SavedAllSockets);
+ }
+ mask &= ~((fd_mask) 1 << curoff);
+ }
+ }
+}
+
+/*****************
* CloseDownConnection
* Delete client from AllClients and free resources
*****************/

View File

@ -0,0 +1,67 @@
From: Egbert Eich <eich@suse.de>
Date: Wed Feb 10 15:55:51 2016 +0100
Subject: [PATCH]pci/primary: Fix up primary PCI device detection for the platfrom bus
Patch-mainline: to be upstreamed
Git-commit: 85d81d3ec321572aea31d34a87632442687a54f5
References: boo#835975
Signed-off-by: Egbert Eich <eich@suse.com>
The detection wheter a device is the primary PCI device currently
relies on libciaccess. This checks of the PCI device is a VGA boot
device. On some systems however, the primary card is not flagged
like that - this it is not discovered.
The subsequent PCI probing has a fallback heuristic designed for this
situation. This however causes the primary device to be flagged as a
PCI bus device, not a 'platform bus' device.
To fix this, we check in the subsequent xf86platformPrimary() wheter
the primary device is flagged as a PCI bus device. If this is the
case and the same device is in the list of the 'platform bus' devices,
we reflag it as such.
This fixes the detection of the primary device on older iMacs.
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/common/xf86platformBus.c | 29 +++++++++++++++++++++++++++++
1 file changed, 29 insertions(+)
Index: xorg-server-21.1.1/hw/xfree86/common/xf86platformBus.c
===================================================================
--- xorg-server-21.1.1.orig/hw/xfree86/common/xf86platformBus.c
+++ xorg-server-21.1.1/hw/xfree86/common/xf86platformBus.c
@@ -766,6 +766,35 @@ void xf86platformPrimary(void)
xf86Msg(X_NONE, "\tfalling back to %s\n", primaryBus.id.plat->attribs->syspath);
}
+ } else if (xf86_num_platform_devices > 0 && primaryBus.type == BUS_PCI) {
+ /*
+ * FIXUP: platform_find_pci_info() may not always find the primary
+ * platform device. If a primary device is a platform device but was
+ * identified as PCI device, let's fix this up here.
+ */
+ int i;
+
+ for (i = 0; i < xf86_num_platform_devices; i++) {
+ char *busid = xf86_platform_odev_attributes(i)->busid;
+ int domain, bus, dev, func;
+ int ret;
+
+ if (!busid || (strncmp(busid, "pci:", 4) != 0))
+ continue;
+
+ ret = sscanf(busid, "pci:%04x:%02x:%02x.%u",
+ &domain, &bus, &dev, &func);
+ if (ret != 4)
+ continue;
+
+ if (domain == primaryBus.id.pci->domain &&
+ bus == primaryBus.id.pci->bus &&
+ dev == primaryBus.id.pci->dev &&
+ func == primaryBus.id.pci->func) {
+ primaryBus.id.plat = &xf86_platform_devices[i];
+ primaryBus.type = BUS_PLATFORM;
+ }
+ }
}
}
#endif

View File

@ -0,0 +1,42 @@
Patch-mainline: To be upstreamed
Author: Michal Srb <msrb@suse.com>
Subject: randr: Do not crash if slave screen does not have provider.
References: bnc#1068961
All GPU screens are attached as unbound GPUs to master, even if they have no
capabilities or the provider field is null. Handle that case in RRTellChanged.
---
This prevents crash in setups with for example two qxl devices, or fbdev and
qxl device. I am not sure if it is a proper fix and not just papering over a
bug somewhere else, but there are more places that test whether the provider
is set, so maybe it is correct way.
I would think that if a slave screen does not have provider, there is no reason
for it to become an unbound GPU in master's slave_list. Similarly if master has
no provider, then having anything in slave_list is useless. But it seems the
AttachUnboundGPU and the rest of the code handling screen to GPU screen
attachments does not know about randr's privates, so it can not check whether
provider is there.
randr/randr.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
Index: xorg-server-21.1.0/randr/randr.c
===================================================================
--- xorg-server-21.1.0.orig/randr/randr.c
+++ xorg-server-21.1.0/randr/randr.c
@@ -650,8 +650,13 @@ RRTellChanged(ScreenPtr pScreen)
pScrPriv->crtcs[i]->changed = FALSE;
xorg_list_for_each_entry(iter, &primary->secondary_list, secondary_head) {
+ if (!dixPrivateKeyRegistered(rrPrivKey)) {
+ break;
+ }
pSecondaryScrPriv = rrGetScrPriv(iter);
- pSecondaryScrPriv->provider->changed = FALSE;
+ if (pSecondaryScrPriv->provider) {
+ pSecondaryScrPriv->provider->changed = FALSE;
+ }
if (iter->is_output_secondary) {
for (i = 0; i < pSecondaryScrPriv->numOutputs; i++)
pSecondaryScrPriv->outputs[i]->changed = FALSE;

View File

@ -0,0 +1,748 @@
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/crocus_pci_ids.h
===================================================================
--- /dev/null
+++ xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/crocus_pci_ids.h
@@ -0,0 +1,104 @@
+CHIPSET(0x29A2, i965, "BW", "Intel(R) 965G")
+CHIPSET(0x2992, i965, "BW", "Intel(R) 965Q")
+CHIPSET(0x2982, i965, "BW", "Intel(R) 965G")
+CHIPSET(0x2972, i965, "BW", "Intel(R) 946GZ")
+CHIPSET(0x2A02, i965, "CL", "Intel(R) 965GM")
+CHIPSET(0x2A12, i965, "CL", "Intel(R) 965GME/GLE")
+
+CHIPSET(0x2A42, g4x, "CTG", "Mobile Intel® GM45 Express Chipset")
+CHIPSET(0x2E02, g4x, "ELK", "Intel(R) Integrated Graphics Device")
+CHIPSET(0x2E12, g4x, "ELK", "Intel(R) Q45/Q43")
+CHIPSET(0x2E22, g4x, "ELK", "Intel(R) G45/G43")
+CHIPSET(0x2E32, g4x, "ELK", "Intel(R) G41")
+CHIPSET(0x2E42, g4x, "ELK", "Intel(R) B43")
+CHIPSET(0x2E92, g4x, "ELK", "Intel(R) B43")
+
+CHIPSET(0x0042, ilk, "ILK", "Intel(R) HD Graphics")
+CHIPSET(0x0046, ilk, "ILK", "Intel(R) HD Graphics")
+
+CHIPSET(0x0102, snb_gt1, "SNB GT1", "Intel(R) HD Graphics 2000")
+CHIPSET(0x0112, snb_gt2, "SNB GT2", "Intel(R) HD Graphics 3000")
+CHIPSET(0x0122, snb_gt2, "SNB GT2", "Intel(R) HD Graphics 3000")
+CHIPSET(0x0106, snb_gt1, "SNB GT1", "Intel(R) HD Graphics 2000")
+CHIPSET(0x0116, snb_gt2, "SNB GT2", "Intel(R) HD Graphics 3000")
+CHIPSET(0x0126, snb_gt2, "SNB GT2", "Intel(R) HD Graphics 3000")
+CHIPSET(0x010A, snb_gt1, "SNB GT1", "Intel(R) HD Graphics 2000")
+
+CHIPSET(0x0152, ivb_gt1, "IVB GT1", "Intel(R) HD Graphics 2500")
+CHIPSET(0x0162, ivb_gt2, "IVB GT2", "Intel(R) HD Graphics 4000")
+CHIPSET(0x0156, ivb_gt1, "IVB GT1", "Intel(R) HD Graphics 2500")
+CHIPSET(0x0166, ivb_gt2, "IVB GT2", "Intel(R) HD Graphics 4000")
+CHIPSET(0x015a, ivb_gt1, "IVB GT1", "Intel(R) HD Graphics")
+CHIPSET(0x016a, ivb_gt2, "IVB GT2", "Intel(R) HD Graphics P4000")
+
+CHIPSET(0x0402, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0412, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4600")
+CHIPSET(0x0422, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0406, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0416, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4600")
+CHIPSET(0x0426, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x040A, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x041A, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics P4600/P4700")
+CHIPSET(0x042A, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x040B, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x041B, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x042B, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x040E, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x041E, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4400")
+CHIPSET(0x042E, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0C02, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0C12, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0C22, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0C06, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0C16, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0C26, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0C0A, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0C1A, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0C2A, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0C0B, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0C1B, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0C2B, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0C0E, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0C1E, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0C2E, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0A02, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0A12, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0A22, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0A06, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0A16, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4400")
+CHIPSET(0x0A26, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics 5000")
+CHIPSET(0x0A0A, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0A1A, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0A2A, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0A0B, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0A1B, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0A2B, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0A0E, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0A1E, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4200")
+CHIPSET(0x0A2E, hsw_gt3, "HSW GT3", "Intel(R) Iris(R) Graphics 5100")
+CHIPSET(0x0D02, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0D12, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics 4600")
+CHIPSET(0x0D22, hsw_gt3, "HSW GT3", "Intel(R) Iris(R) Pro Graphics 5200")
+CHIPSET(0x0D06, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0D16, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0D26, hsw_gt3, "HSW GT3", "Intel(R) Iris(R) Pro Graphics P5200")
+CHIPSET(0x0D0A, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0D1A, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0D2A, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0D0B, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0D1B, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0D2B, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+CHIPSET(0x0D0E, hsw_gt1, "HSW GT1", "Intel(R) HD Graphics")
+CHIPSET(0x0D1E, hsw_gt2, "HSW GT2", "Intel(R) HD Graphics")
+CHIPSET(0x0D2E, hsw_gt3, "HSW GT3", "Intel(R) HD Graphics")
+
+CHIPSET(0x0F31, byt, "BYT", "Intel(R) HD Graphics")
+CHIPSET(0x0F32, byt, "BYT", "Intel(R) HD Graphics")
+CHIPSET(0x0F33, byt, "BYT", "Intel(R) HD Graphics")
+CHIPSET(0x0157, byt, "BYT", "Intel(R) HD Graphics")
+CHIPSET(0x0155, byt, "BYT", "Intel(R) HD Graphics")
+
+CHIPSET(0x22B0, chv, "CHV", "Intel(R) HD Graphics")
+CHIPSET(0x22B1, chv, "BSW", "Intel(R) HD Graphics XXX") /* Overridden in brw_get_renderer_string */
+CHIPSET(0x22B2, chv, "CHV", "Intel(R) HD Graphics")
+CHIPSET(0x22B3, chv, "CHV", "Intel(R) HD Graphics")
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/i810_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/i810_pci_ids.h
+++ /dev/null
@@ -1,4 +0,0 @@
-CHIPSET(0x7121, I810, i8xx)
-CHIPSET(0x7123, I810_DC100, i8xx)
-CHIPSET(0x7125, I810_E, i8xx)
-CHIPSET(0x1132, I815, i8xx)
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/i915_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/i915_pci_ids.h
+++ xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/i915_pci_ids.h
@@ -1,7 +1,3 @@
-CHIPSET(0x3577, I830_M, "Intel(R) 830M")
-CHIPSET(0x2562, 845_G, "Intel(R) 845G")
-CHIPSET(0x3582, I855_GM, "Intel(R) 852GM/855GM")
-CHIPSET(0x2572, I865_G, "Intel(R) 865G")
CHIPSET(0x2582, I915_G, "Intel(R) 915G")
CHIPSET(0x258A, E7221_G, "Intel(R) E7221G (i915)")
CHIPSET(0x2592, I915_GM, "Intel(R) 915GM")
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/i965_pci_ids.h
+++ /dev/null
@@ -1,252 +0,0 @@
-#ifndef IRIS
-CHIPSET(0x29A2, i965, "Intel(R) 965G")
-CHIPSET(0x2992, i965, "Intel(R) 965Q")
-CHIPSET(0x2982, i965, "Intel(R) 965G")
-CHIPSET(0x2972, i965, "Intel(R) 946GZ")
-CHIPSET(0x2A02, i965, "Intel(R) 965GM")
-CHIPSET(0x2A12, i965, "Intel(R) 965GME/GLE")
-CHIPSET(0x2A42, g4x, "Mobile Intel® GM45 Express Chipset")
-CHIPSET(0x2E02, g4x, "Intel(R) Integrated Graphics Device")
-CHIPSET(0x2E12, g4x, "Intel(R) Q45/Q43")
-CHIPSET(0x2E22, g4x, "Intel(R) G45/G43")
-CHIPSET(0x2E32, g4x, "Intel(R) G41")
-CHIPSET(0x2E42, g4x, "Intel(R) B43")
-CHIPSET(0x2E92, g4x, "Intel(R) B43")
-CHIPSET(0x0042, ilk, "Intel(R) Ironlake Desktop")
-CHIPSET(0x0046, ilk, "Intel(R) Ironlake Mobile")
-CHIPSET(0x0102, snb_gt1, "Intel(R) Sandybridge Desktop")
-CHIPSET(0x0112, snb_gt2, "Intel(R) Sandybridge Desktop")
-CHIPSET(0x0122, snb_gt2, "Intel(R) Sandybridge Desktop")
-CHIPSET(0x0106, snb_gt1, "Intel(R) Sandybridge Mobile")
-CHIPSET(0x0116, snb_gt2, "Intel(R) Sandybridge Mobile")
-CHIPSET(0x0126, snb_gt2, "Intel(R) Sandybridge Mobile")
-CHIPSET(0x010A, snb_gt1, "Intel(R) Sandybridge Server")
-CHIPSET(0x0152, ivb_gt1, "Intel(R) Ivybridge Desktop")
-CHIPSET(0x0162, ivb_gt2, "Intel(R) Ivybridge Desktop")
-CHIPSET(0x0156, ivb_gt1, "Intel(R) Ivybridge Mobile")
-CHIPSET(0x0166, ivb_gt2, "Intel(R) Ivybridge Mobile")
-CHIPSET(0x015a, ivb_gt1, "Intel(R) Ivybridge Server")
-CHIPSET(0x016a, ivb_gt2, "Intel(R) Ivybridge Server")
-CHIPSET(0x0402, hsw_gt1, "Intel(R) Haswell Desktop")
-CHIPSET(0x0412, hsw_gt2, "Intel(R) Haswell Desktop")
-CHIPSET(0x0422, hsw_gt3, "Intel(R) Haswell Desktop")
-CHIPSET(0x0406, hsw_gt1, "Intel(R) Haswell Mobile")
-CHIPSET(0x0416, hsw_gt2, "Intel(R) Haswell Mobile")
-CHIPSET(0x0426, hsw_gt3, "Intel(R) Haswell Mobile")
-CHIPSET(0x040A, hsw_gt1, "Intel(R) Haswell Server")
-CHIPSET(0x041A, hsw_gt2, "Intel(R) Haswell Server")
-CHIPSET(0x042A, hsw_gt3, "Intel(R) Haswell Server")
-CHIPSET(0x040B, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x041B, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x042B, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x040E, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x041E, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x042E, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0C02, hsw_gt1, "Intel(R) Haswell Desktop")
-CHIPSET(0x0C12, hsw_gt2, "Intel(R) Haswell Desktop")
-CHIPSET(0x0C22, hsw_gt3, "Intel(R) Haswell Desktop")
-CHIPSET(0x0C06, hsw_gt1, "Intel(R) Haswell Mobile")
-CHIPSET(0x0C16, hsw_gt2, "Intel(R) Haswell Mobile")
-CHIPSET(0x0C26, hsw_gt3, "Intel(R) Haswell Mobile")
-CHIPSET(0x0C0A, hsw_gt1, "Intel(R) Haswell Server")
-CHIPSET(0x0C1A, hsw_gt2, "Intel(R) Haswell Server")
-CHIPSET(0x0C2A, hsw_gt3, "Intel(R) Haswell Server")
-CHIPSET(0x0C0B, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0C1B, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0C2B, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0C0E, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0C1E, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0C2E, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0A02, hsw_gt1, "Intel(R) Haswell Desktop")
-CHIPSET(0x0A12, hsw_gt2, "Intel(R) Haswell Desktop")
-CHIPSET(0x0A22, hsw_gt3, "Intel(R) Haswell Desktop")
-CHIPSET(0x0A06, hsw_gt1, "Intel(R) Haswell Mobile")
-CHIPSET(0x0A16, hsw_gt2, "Intel(R) Haswell Mobile")
-CHIPSET(0x0A26, hsw_gt3, "Intel(R) Haswell Mobile")
-CHIPSET(0x0A0A, hsw_gt1, "Intel(R) Haswell Server")
-CHIPSET(0x0A1A, hsw_gt2, "Intel(R) Haswell Server")
-CHIPSET(0x0A2A, hsw_gt3, "Intel(R) Haswell Server")
-CHIPSET(0x0A0B, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0A1B, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0A2B, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0A0E, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0A1E, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0A2E, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0D02, hsw_gt1, "Intel(R) Haswell Desktop")
-CHIPSET(0x0D12, hsw_gt2, "Intel(R) Haswell Desktop")
-CHIPSET(0x0D22, hsw_gt3, "Intel(R) Haswell Desktop")
-CHIPSET(0x0D06, hsw_gt1, "Intel(R) Haswell Mobile")
-CHIPSET(0x0D16, hsw_gt2, "Intel(R) Haswell Mobile")
-CHIPSET(0x0D26, hsw_gt3, "Intel(R) Haswell Mobile")
-CHIPSET(0x0D0A, hsw_gt1, "Intel(R) Haswell Server")
-CHIPSET(0x0D1A, hsw_gt2, "Intel(R) Haswell Server")
-CHIPSET(0x0D2A, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0D0B, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0D1B, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0D2B, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0D0E, hsw_gt1, "Intel(R) Haswell")
-CHIPSET(0x0D1E, hsw_gt2, "Intel(R) Haswell")
-CHIPSET(0x0D2E, hsw_gt3, "Intel(R) Haswell")
-CHIPSET(0x0F31, byt, "Intel(R) Bay Trail")
-CHIPSET(0x0F32, byt, "Intel(R) Bay Trail")
-CHIPSET(0x0F33, byt, "Intel(R) Bay Trail")
-CHIPSET(0x0157, byt, "Intel(R) Bay Trail")
-CHIPSET(0x0155, byt, "Intel(R) Bay Trail")
-CHIPSET(0x22B0, chv, "Intel(R) HD Graphics (Cherrytrail)")
-CHIPSET(0x22B1, chv, "Intel(R) HD Graphics XXX (Braswell)") /* Overridden in brw_get_renderer_string */
-CHIPSET(0x22B2, chv, "Intel(R) HD Graphics (Cherryview)")
-CHIPSET(0x22B3, chv, "Intel(R) HD Graphics (Cherryview)")
-#endif
-CHIPSET(0x1602, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x1606, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x160A, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x160B, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x160D, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x160E, bdw_gt1, "Intel(R) Broadwell GT1")
-CHIPSET(0x1612, bdw_gt2, "Intel(R) HD Graphics 5600 (Broadwell GT2)")
-CHIPSET(0x1616, bdw_gt2, "Intel(R) HD Graphics 5500 (Broadwell GT2)")
-CHIPSET(0x161A, bdw_gt2, "Intel(R) Broadwell GT2")
-CHIPSET(0x161B, bdw_gt2, "Intel(R) Broadwell GT2")
-CHIPSET(0x161D, bdw_gt2, "Intel(R) Broadwell GT2")
-CHIPSET(0x161E, bdw_gt2, "Intel(R) HD Graphics 5300 (Broadwell GT2)")
-CHIPSET(0x1622, bdw_gt3, "Intel(R) Iris Pro 6200 (Broadwell GT3e)")
-CHIPSET(0x1626, bdw_gt3, "Intel(R) HD Graphics 6000 (Broadwell GT3)")
-CHIPSET(0x162A, bdw_gt3, "Intel(R) Iris Pro P6300 (Broadwell GT3e)")
-CHIPSET(0x162B, bdw_gt3, "Intel(R) Iris 6100 (Broadwell GT3)")
-CHIPSET(0x162D, bdw_gt3, "Intel(R) Broadwell GT3")
-CHIPSET(0x162E, bdw_gt3, "Intel(R) Broadwell GT3")
-CHIPSET(0x1902, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
-CHIPSET(0x1906, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
-CHIPSET(0x190A, skl_gt1, "Intel(R) Skylake GT1")
-CHIPSET(0x190B, skl_gt1, "Intel(R) HD Graphics 510 (Skylake GT1)")
-CHIPSET(0x190E, skl_gt1, "Intel(R) Skylake GT1")
-CHIPSET(0x1912, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)")
-CHIPSET(0x1913, skl_gt2, "Intel(R) Skylake GT2f")
-CHIPSET(0x1915, skl_gt2, "Intel(R) Skylake GT2f")
-CHIPSET(0x1916, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)")
-CHIPSET(0x1917, skl_gt2, "Intel(R) Skylake GT2f")
-CHIPSET(0x191A, skl_gt2, "Intel(R) Skylake GT2")
-CHIPSET(0x191B, skl_gt2, "Intel(R) HD Graphics 530 (Skylake GT2)")
-CHIPSET(0x191D, skl_gt2, "Intel(R) HD Graphics P530 (Skylake GT2)")
-CHIPSET(0x191E, skl_gt2, "Intel(R) HD Graphics 515 (Skylake GT2)")
-CHIPSET(0x1921, skl_gt2, "Intel(R) HD Graphics 520 (Skylake GT2)")
-CHIPSET(0x1923, skl_gt3, "Intel(R) Skylake GT3e")
-CHIPSET(0x1926, skl_gt3, "Intel(R) Iris Graphics 540 (Skylake GT3e)")
-CHIPSET(0x1927, skl_gt3, "Intel(R) Iris Graphics 550 (Skylake GT3e)")
-CHIPSET(0x192A, skl_gt4, "Intel(R) Skylake GT4")
-CHIPSET(0x192B, skl_gt3, "Intel(R) Iris Graphics 555 (Skylake GT3e)")
-CHIPSET(0x192D, skl_gt3, "Intel(R) Iris Graphics P555 (Skylake GT3e)")
-CHIPSET(0x1932, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)")
-CHIPSET(0x193A, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)")
-CHIPSET(0x193B, skl_gt4, "Intel(R) Iris Pro Graphics 580 (Skylake GT4e)")
-CHIPSET(0x193D, skl_gt4, "Intel(R) Iris Pro Graphics P580 (Skylake GT4e)")
-CHIPSET(0x0A84, bxt, "Intel(R) HD Graphics (Broxton)")
-CHIPSET(0x1A84, bxt, "Intel(R) HD Graphics (Broxton)")
-CHIPSET(0x1A85, bxt_2x6, "Intel(R) HD Graphics (Broxton 2x6)")
-CHIPSET(0x5A84, bxt, "Intel(R) HD Graphics 505 (Broxton)")
-CHIPSET(0x5A85, bxt_2x6, "Intel(R) HD Graphics 500 (Broxton 2x6)")
-CHIPSET(0x5902, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)")
-CHIPSET(0x5906, kbl_gt1, "Intel(R) HD Graphics 610 (Kaby Lake GT1)")
-CHIPSET(0x590A, kbl_gt1, "Intel(R) Kabylake GT1")
-CHIPSET(0x5908, kbl_gt1, "Intel(R) Kabylake GT1")
-CHIPSET(0x590B, kbl_gt1, "Intel(R) Kabylake GT1")
-CHIPSET(0x590E, kbl_gt1, "Intel(R) Kabylake GT1")
-CHIPSET(0x5913, kbl_gt1_5, "Intel(R) Kabylake GT1.5")
-CHIPSET(0x5915, kbl_gt1_5, "Intel(R) Kabylake GT1.5")
-CHIPSET(0x5917, kbl_gt2, "Intel(R) UHD Graphics 620 (Kabylake GT2)")
-CHIPSET(0x5912, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)")
-CHIPSET(0x5916, kbl_gt2, "Intel(R) HD Graphics 620 (Kaby Lake GT2)")
-CHIPSET(0x591A, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)")
-CHIPSET(0x591B, kbl_gt2, "Intel(R) HD Graphics 630 (Kaby Lake GT2)")
-CHIPSET(0x591D, kbl_gt2, "Intel(R) HD Graphics P630 (Kaby Lake GT2)")
-CHIPSET(0x591E, kbl_gt2, "Intel(R) HD Graphics 615 (Kaby Lake GT2)")
-CHIPSET(0x5921, kbl_gt2, "Intel(R) Kabylake GT2F")
-CHIPSET(0x5923, kbl_gt3, "Intel(R) Kabylake GT3")
-CHIPSET(0x5926, kbl_gt3, "Intel(R) Iris Plus Graphics 640 (Kaby Lake GT3e)")
-CHIPSET(0x5927, kbl_gt3, "Intel(R) Iris Plus Graphics 650 (Kaby Lake GT3e)")
-CHIPSET(0x593B, kbl_gt4, "Intel(R) Kabylake GT4")
-CHIPSET(0x591C, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2")
-CHIPSET(0x87C0, kbl_gt2, "Intel(R) Amber Lake (Kabylake) GT2")
-CHIPSET(0x87CA, cfl_gt2, "Intel(R) Amber Lake (Coffeelake) GT2")
-CHIPSET(0x3184, glk, "Intel(R) UHD Graphics 605 (Geminilake)")
-CHIPSET(0x3185, glk_2x6, "Intel(R) UHD Graphics 600 (Geminilake 2x6)")
-CHIPSET(0x3E90, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)")
-CHIPSET(0x3E93, cfl_gt1, "Intel(R) UHD Graphics 610 (Coffeelake 2x6 GT1)")
-CHIPSET(0x3E99, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
-CHIPSET(0x3E9C, cfl_gt1, "Intel(R) HD Graphics (Coffeelake 2x6 GT1)")
-CHIPSET(0x3E91, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E92, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E96, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E98, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E9A, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E9B, cfl_gt2, "Intel(R) UHD Graphics 630 (Coffeelake 3x8 GT2)")
-CHIPSET(0x3E94, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3EA9, cfl_gt2, "Intel(R) HD Graphics (Coffeelake 3x8 GT2)")
-CHIPSET(0x3EA5, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
-CHIPSET(0x3EA6, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
-CHIPSET(0x3EA7, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
-CHIPSET(0x3EA8, cfl_gt3, "Intel(R) HD Graphics (Coffeelake 3x8 GT3)")
-CHIPSET(0x3EA1, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 2x6 GT1)")
-CHIPSET(0x3EA4, cfl_gt1, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT1)")
-CHIPSET(0x3EA0, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
-CHIPSET(0x3EA3, cfl_gt2, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT2)")
-CHIPSET(0x3EA2, cfl_gt3, "Intel(R) HD Graphics (Whiskey Lake 3x8 GT3)")
-CHIPSET(0x9B21, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BA0, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BA2, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BA4, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BA5, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BA8, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BAA, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BAB, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9BAC, cfl_gt1, "Intel(R) HD Graphics (Comet Lake 2x6 GT1)")
-CHIPSET(0x9B41, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BC0, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BC2, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BC4, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BC5, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BC8, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BCA, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BCB, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x9BCC, cfl_gt2, "Intel(R) HD Graphics (Comet Lake 3x8 GT2)")
-CHIPSET(0x5A49, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
-CHIPSET(0x5A4A, cnl_2x8, "Intel(R) HD Graphics (Cannonlake 2x8 GT0.5)")
-CHIPSET(0x5A41, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)")
-CHIPSET(0x5A42, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)")
-CHIPSET(0x5A44, cnl_3x8, "Intel(R) HD Graphics (Cannonlake 3x8 GT1)")
-CHIPSET(0x5A59, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)")
-CHIPSET(0x5A5A, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)")
-CHIPSET(0x5A5C, cnl_4x8, "Intel(R) HD Graphics (Cannonlake 4x8 GT1.5)")
-CHIPSET(0x5A50, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)")
-CHIPSET(0x5A51, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)")
-CHIPSET(0x5A52, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)")
-CHIPSET(0x5A54, cnl_5x8, "Intel(R) HD Graphics (Cannonlake 5x8 GT2)")
-CHIPSET(0x8A50, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
-CHIPSET(0x8A51, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
-CHIPSET(0x8A52, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
-CHIPSET(0x8A53, icl_8x8, "Intel(R) HD Graphics (Ice Lake 8x8 GT2)")
-CHIPSET(0x8A54, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
-CHIPSET(0x8A56, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
-CHIPSET(0x8A57, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
-CHIPSET(0x8A58, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
-CHIPSET(0x8A59, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
-CHIPSET(0x8A5A, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
-CHIPSET(0x8A5B, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
-CHIPSET(0x8A5C, icl_6x8, "Intel(R) HD Graphics (Ice Lake 6x8 GT1.5)")
-CHIPSET(0x8A5D, icl_4x8, "Intel(R) HD Graphics (Ice Lake 4x8 GT1)")
-CHIPSET(0x8A71, icl_1x8, "Intel(R) HD Graphics (Ice Lake 1x8 GT0.5)")
-CHIPSET(0x4500, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
-CHIPSET(0x4571, ehl_4x8, "Intel(R) HD Graphics (Elkhart Lake 4x8)")
-CHIPSET(0x4551, ehl_4x4, "Intel(R) HD Graphics (Elkhart Lake 4x4)")
-CHIPSET(0x4541, ehl_2x4, "Intel(R) HD Graphics (Elkhart Lake 2x4)")
-CHIPSET(0x9A40, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
-CHIPSET(0x9A49, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
-CHIPSET(0x9A59, tgl_1x6x16, "Intel(R) HD Graphics (Tigerlake 1x6x16 GT2)")
-CHIPSET(0x9A60, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
-CHIPSET(0x9A68, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
-CHIPSET(0x9A70, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
-CHIPSET(0x9A78, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT1)")
-CHIPSET(0x9AC0, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
-CHIPSET(0x9AC9, tg1_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
-CHIPSET(0x9AD9, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1x2x16 GT2)")
-CHIPSET(0x9AF8, tgl_1x2x16, "Intel(R) HD Graphics (Tigerlake 1X2X16 GT2)")
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
+++ xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/pci_id_driver_map.h
@@ -8,31 +8,17 @@
#endif
static const int i915_chip_ids[] = {
-#define CHIPSET(chip, desc, name) chip,
+#define CHIPSET(chip, name, desc) chip,
#include "pci_ids/i915_pci_ids.h"
#undef CHIPSET
};
-static const int i965_chip_ids[] = {
-#define CHIPSET(chip, family, name) chip,
-#include "pci_ids/i965_pci_ids.h"
+static const int crocus_chip_ids[] = {
+#define CHIPSET(chip, family, name, desc) chip,
+#include "pci_ids/crocus_pci_ids.h"
#undef CHIPSET
};
-#ifndef DRIVER_MAP_GALLIUM_ONLY
-static const int r100_chip_ids[] = {
-#define CHIPSET(chip, name, family) chip,
-#include "pci_ids/radeon_pci_ids.h"
-#undef CHIPSET
-};
-
-static const int r200_chip_ids[] = {
-#define CHIPSET(chip, name, family) chip,
-#include "pci_ids/r200_pci_ids.h"
-#undef CHIPSET
-};
-#endif
-
static const int r300_chip_ids[] = {
#define CHIPSET(chip, name, family) chip,
#include "pci_ids/r300_pci_ids.h"
@@ -64,12 +50,8 @@ static const struct {
int num_chips_ids;
} driver_map[] = {
{ 0x8086, "i915", i915_chip_ids, ARRAY_SIZE(i915_chip_ids) },
- { 0x8086, "i965", i965_chip_ids, ARRAY_SIZE(i965_chip_ids) },
- { 0x8086, "i965", NULL, -1 },
-#ifndef DRIVER_MAP_GALLIUM_ONLY
- { 0x1002, "radeon", r100_chip_ids, ARRAY_SIZE(r100_chip_ids) },
- { 0x1002, "r200", r200_chip_ids, ARRAY_SIZE(r200_chip_ids) },
-#endif
+ { 0x8086, "crocus", crocus_chip_ids, ARRAY_SIZE(crocus_chip_ids) },
+ { 0x8086, "iris", NULL, -1 },
{ 0x1002, "r300", r300_chip_ids, ARRAY_SIZE(r300_chip_ids) },
{ 0x1002, "r600", r600_chip_ids, ARRAY_SIZE(r600_chip_ids) },
{ 0x1002, "radeonsi", NULL, -1 },
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/r200_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/r200_pci_ids.h
+++ /dev/null
@@ -1,24 +0,0 @@
-CHIPSET(0x5148, R200_QH, R200)
-CHIPSET(0x514C, R200_QL, R200)
-CHIPSET(0x514D, R200_QM, R200)
-CHIPSET(0x4242, R200_BB, R200)
-
-CHIPSET(0x4966, RV250_If, RV250)
-CHIPSET(0x4967, RV250_Ig, RV250)
-CHIPSET(0x4C64, RV250_Ld, RV250)
-CHIPSET(0x4C66, RV250_Lf, RV250)
-CHIPSET(0x4C67, RV250_Lg, RV250)
-
-CHIPSET(0x4C6E, RV280_4C6E, RV280)
-CHIPSET(0x5960, RV280_5960, RV280)
-CHIPSET(0x5961, RV280_5961, RV280)
-CHIPSET(0x5962, RV280_5962, RV280)
-CHIPSET(0x5964, RV280_5964, RV280)
-CHIPSET(0x5965, RV280_5965, RV280)
-CHIPSET(0x5C61, RV280_5C61, RV280)
-CHIPSET(0x5C63, RV280_5C63, RV280)
-
-CHIPSET(0x5834, RS300_5834, RS300)
-CHIPSET(0x5835, RS300_5835, RS300)
-CHIPSET(0x7834, RS350_7834, RS300)
-CHIPSET(0x7835, RS350_7835, RS300)
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/radeon_pci_ids.h
+++ /dev/null
@@ -1,23 +0,0 @@
-CHIPSET(0x4C57, RADEON_LW, RV200)
-CHIPSET(0x4C58, RADEON_LX, RV200)
-CHIPSET(0x4C59, RADEON_LY, RV100)
-CHIPSET(0x4C5A, RADEON_LZ, RV100)
-CHIPSET(0x5144, RADEON_QD, R100)
-CHIPSET(0x5145, RADEON_QE, R100)
-CHIPSET(0x5146, RADEON_QF, R100)
-CHIPSET(0x5147, RADEON_QG, R100)
-CHIPSET(0x5159, RADEON_QY, RV100)
-CHIPSET(0x515A, RADEON_QZ, RV100)
-
-CHIPSET(0x5157, RV200_QW, RV200)
-CHIPSET(0x5158, RV200_QX, RV200)
-
-CHIPSET(0x515E, RN50_515E, UNKNOWN)
-CHIPSET(0x5969, RN50_5969, UNKNOWN)
-
-CHIPSET(0x4136, RS100_4136, RS100)
-CHIPSET(0x4336, RS100_4336, RS100)
-CHIPSET(0x4137, RS200_4137, RS200)
-CHIPSET(0x4337, RS200_4337, RS200)
-CHIPSET(0x4237, RS250_4237, RS200)
-CHIPSET(0x4437, RS250_4437, RS200)
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/radeonsi_pci_ids.h
+++ /dev/null
@@ -1,237 +0,0 @@
-CHIPSET(0x6780, TAHITI_6780, TAHITI)
-CHIPSET(0x6784, TAHITI_6784, TAHITI)
-CHIPSET(0x6788, TAHITI_6788, TAHITI)
-CHIPSET(0x678A, TAHITI_678A, TAHITI)
-CHIPSET(0x6790, TAHITI_6790, TAHITI)
-CHIPSET(0x6791, TAHITI_6791, TAHITI)
-CHIPSET(0x6792, TAHITI_6792, TAHITI)
-CHIPSET(0x6798, TAHITI_6798, TAHITI)
-CHIPSET(0x6799, TAHITI_6799, TAHITI)
-CHIPSET(0x679A, TAHITI_679A, TAHITI)
-CHIPSET(0x679B, TAHITI_679B, TAHITI)
-CHIPSET(0x679E, TAHITI_679E, TAHITI)
-CHIPSET(0x679F, TAHITI_679F, TAHITI)
-
-CHIPSET(0x6800, PITCAIRN_6800, PITCAIRN)
-CHIPSET(0x6801, PITCAIRN_6801, PITCAIRN)
-CHIPSET(0x6802, PITCAIRN_6802, PITCAIRN)
-CHIPSET(0x6806, PITCAIRN_6806, PITCAIRN)
-CHIPSET(0x6808, PITCAIRN_6808, PITCAIRN)
-CHIPSET(0x6809, PITCAIRN_6809, PITCAIRN)
-CHIPSET(0x6810, PITCAIRN_6810, PITCAIRN)
-CHIPSET(0x6811, PITCAIRN_6811, PITCAIRN)
-CHIPSET(0x6816, PITCAIRN_6816, PITCAIRN)
-CHIPSET(0x6817, PITCAIRN_6817, PITCAIRN)
-CHIPSET(0x6818, PITCAIRN_6818, PITCAIRN)
-CHIPSET(0x6819, PITCAIRN_6819, PITCAIRN)
-CHIPSET(0x684C, PITCAIRN_684C, PITCAIRN)
-
-CHIPSET(0x6820, VERDE_6820, VERDE)
-CHIPSET(0x6821, VERDE_6821, VERDE)
-CHIPSET(0x6822, VERDE_6822, VERDE)
-CHIPSET(0x6823, VERDE_6823, VERDE)
-CHIPSET(0x6824, VERDE_6824, VERDE)
-CHIPSET(0x6825, VERDE_6825, VERDE)
-CHIPSET(0x6826, VERDE_6826, VERDE)
-CHIPSET(0x6827, VERDE_6827, VERDE)
-CHIPSET(0x6828, VERDE_6828, VERDE)
-CHIPSET(0x6829, VERDE_6829, VERDE)
-CHIPSET(0x682A, VERDE_682A, VERDE)
-CHIPSET(0x682B, VERDE_682B, VERDE)
-CHIPSET(0x682C, VERDE_682C, VERDE)
-CHIPSET(0x682D, VERDE_682D, VERDE)
-CHIPSET(0x682F, VERDE_682F, VERDE)
-CHIPSET(0x6830, VERDE_6830, VERDE)
-CHIPSET(0x6831, VERDE_6831, VERDE)
-CHIPSET(0x6835, VERDE_6835, VERDE)
-CHIPSET(0x6837, VERDE_6837, VERDE)
-CHIPSET(0x6838, VERDE_6838, VERDE)
-CHIPSET(0x6839, VERDE_6839, VERDE)
-CHIPSET(0x683B, VERDE_683B, VERDE)
-CHIPSET(0x683D, VERDE_683D, VERDE)
-CHIPSET(0x683F, VERDE_683F, VERDE)
-
-CHIPSET(0x6600, OLAND_6600, OLAND)
-CHIPSET(0x6601, OLAND_6601, OLAND)
-CHIPSET(0x6602, OLAND_6602, OLAND)
-CHIPSET(0x6603, OLAND_6603, OLAND)
-CHIPSET(0x6604, OLAND_6604, OLAND)
-CHIPSET(0x6605, OLAND_6605, OLAND)
-CHIPSET(0x6606, OLAND_6606, OLAND)
-CHIPSET(0x6607, OLAND_6607, OLAND)
-CHIPSET(0x6608, OLAND_6608, OLAND)
-CHIPSET(0x6610, OLAND_6610, OLAND)
-CHIPSET(0x6611, OLAND_6611, OLAND)
-CHIPSET(0x6613, OLAND_6613, OLAND)
-CHIPSET(0x6617, OLAND_6617, OLAND)
-CHIPSET(0x6620, OLAND_6620, OLAND)
-CHIPSET(0x6621, OLAND_6621, OLAND)
-CHIPSET(0x6623, OLAND_6623, OLAND)
-CHIPSET(0x6631, OLAND_6631, OLAND)
-
-CHIPSET(0x6660, HAINAN_6660, HAINAN)
-CHIPSET(0x6663, HAINAN_6663, HAINAN)
-CHIPSET(0x6664, HAINAN_6664, HAINAN)
-CHIPSET(0x6665, HAINAN_6665, HAINAN)
-CHIPSET(0x6667, HAINAN_6667, HAINAN)
-CHIPSET(0x666F, HAINAN_666F, HAINAN)
-
-CHIPSET(0x6640, BONAIRE_6640, BONAIRE)
-CHIPSET(0x6641, BONAIRE_6641, BONAIRE)
-CHIPSET(0x6646, BONAIRE_6646, BONAIRE)
-CHIPSET(0x6647, BONAIRE_6647, BONAIRE)
-CHIPSET(0x6649, BONAIRE_6649, BONAIRE)
-CHIPSET(0x6650, BONAIRE_6650, BONAIRE)
-CHIPSET(0x6651, BONAIRE_6651, BONAIRE)
-CHIPSET(0x6658, BONAIRE_6658, BONAIRE)
-CHIPSET(0x665C, BONAIRE_665C, BONAIRE)
-CHIPSET(0x665D, BONAIRE_665D, BONAIRE)
-CHIPSET(0x665F, BONAIRE_665F, BONAIRE)
-
-CHIPSET(0x9830, KABINI_9830, KABINI)
-CHIPSET(0x9831, KABINI_9831, KABINI)
-CHIPSET(0x9832, KABINI_9832, KABINI)
-CHIPSET(0x9833, KABINI_9833, KABINI)
-CHIPSET(0x9834, KABINI_9834, KABINI)
-CHIPSET(0x9835, KABINI_9835, KABINI)
-CHIPSET(0x9836, KABINI_9836, KABINI)
-CHIPSET(0x9837, KABINI_9837, KABINI)
-CHIPSET(0x9838, KABINI_9838, KABINI)
-CHIPSET(0x9839, KABINI_9839, KABINI)
-CHIPSET(0x983A, KABINI_983A, KABINI)
-CHIPSET(0x983B, KABINI_983B, KABINI)
-CHIPSET(0x983C, KABINI_983C, KABINI)
-CHIPSET(0x983D, KABINI_983D, KABINI)
-CHIPSET(0x983E, KABINI_983E, KABINI)
-CHIPSET(0x983F, KABINI_983F, KABINI)
-
-CHIPSET(0x9850, MULLINS_9850, MULLINS)
-CHIPSET(0x9851, MULLINS_9851, MULLINS)
-CHIPSET(0x9852, MULLINS_9852, MULLINS)
-CHIPSET(0x9853, MULLINS_9853, MULLINS)
-CHIPSET(0x9854, MULLINS_9854, MULLINS)
-CHIPSET(0x9855, MULLINS_9855, MULLINS)
-CHIPSET(0x9856, MULLINS_9856, MULLINS)
-CHIPSET(0x9857, MULLINS_9857, MULLINS)
-CHIPSET(0x9858, MULLINS_9858, MULLINS)
-CHIPSET(0x9859, MULLINS_9859, MULLINS)
-CHIPSET(0x985A, MULLINS_985A, MULLINS)
-CHIPSET(0x985B, MULLINS_985B, MULLINS)
-CHIPSET(0x985C, MULLINS_985C, MULLINS)
-CHIPSET(0x985D, MULLINS_985D, MULLINS)
-CHIPSET(0x985E, MULLINS_985E, MULLINS)
-CHIPSET(0x985F, MULLINS_985F, MULLINS)
-
-CHIPSET(0x1304, KAVERI_1304, KAVERI)
-CHIPSET(0x1305, KAVERI_1305, KAVERI)
-CHIPSET(0x1306, KAVERI_1306, KAVERI)
-CHIPSET(0x1307, KAVERI_1307, KAVERI)
-CHIPSET(0x1309, KAVERI_1309, KAVERI)
-CHIPSET(0x130A, KAVERI_130A, KAVERI)
-CHIPSET(0x130B, KAVERI_130B, KAVERI)
-CHIPSET(0x130C, KAVERI_130C, KAVERI)
-CHIPSET(0x130D, KAVERI_130D, KAVERI)
-CHIPSET(0x130E, KAVERI_130E, KAVERI)
-CHIPSET(0x130F, KAVERI_130F, KAVERI)
-CHIPSET(0x1310, KAVERI_1310, KAVERI)
-CHIPSET(0x1311, KAVERI_1311, KAVERI)
-CHIPSET(0x1312, KAVERI_1312, KAVERI)
-CHIPSET(0x1313, KAVERI_1313, KAVERI)
-CHIPSET(0x1315, KAVERI_1315, KAVERI)
-CHIPSET(0x1316, KAVERI_1316, KAVERI)
-CHIPSET(0x1317, KAVERI_1317, KAVERI)
-CHIPSET(0x1318, KAVERI_1318, KAVERI)
-CHIPSET(0x131B, KAVERI_131B, KAVERI)
-CHIPSET(0x131C, KAVERI_131C, KAVERI)
-CHIPSET(0x131D, KAVERI_131D, KAVERI)
-
-CHIPSET(0x67A0, HAWAII_67A0, HAWAII)
-CHIPSET(0x67A1, HAWAII_67A1, HAWAII)
-CHIPSET(0x67A2, HAWAII_67A2, HAWAII)
-CHIPSET(0x67A8, HAWAII_67A8, HAWAII)
-CHIPSET(0x67A9, HAWAII_67A9, HAWAII)
-CHIPSET(0x67AA, HAWAII_67AA, HAWAII)
-CHIPSET(0x67B0, HAWAII_67B0, HAWAII)
-CHIPSET(0x67B1, HAWAII_67B1, HAWAII)
-CHIPSET(0x67B8, HAWAII_67B8, HAWAII)
-CHIPSET(0x67B9, HAWAII_67B9, HAWAII)
-CHIPSET(0x67BA, HAWAII_67BA, HAWAII)
-CHIPSET(0x67BE, HAWAII_67BE, HAWAII)
-
-CHIPSET(0x6900, ICELAND_, ICELAND)
-CHIPSET(0x6901, ICELAND_, ICELAND)
-CHIPSET(0x6902, ICELAND_, ICELAND)
-CHIPSET(0x6903, ICELAND_, ICELAND)
-CHIPSET(0x6907, ICELAND_, ICELAND)
-
-CHIPSET(0x6920, TONGA_, TONGA)
-CHIPSET(0x6921, TONGA_, TONGA)
-CHIPSET(0x6928, TONGA_, TONGA)
-CHIPSET(0x6929, TONGA_, TONGA)
-CHIPSET(0x692B, TONGA_, TONGA)
-CHIPSET(0x692F, TONGA_, TONGA)
-CHIPSET(0x6930, TONGA_, TONGA)
-CHIPSET(0x6938, TONGA_, TONGA)
-CHIPSET(0x6939, TONGA_, TONGA)
-
-CHIPSET(0x9870, CARRIZO_, CARRIZO)
-CHIPSET(0x9874, CARRIZO_, CARRIZO)
-CHIPSET(0x9875, CARRIZO_, CARRIZO)
-CHIPSET(0x9876, CARRIZO_, CARRIZO)
-CHIPSET(0x9877, CARRIZO_, CARRIZO)
-
-CHIPSET(0x7300, FIJI_, FIJI)
-
-CHIPSET(0x67E0, POLARIS11_, POLARIS11)
-CHIPSET(0x67E1, POLARIS11_, POLARIS11)
-CHIPSET(0x67E3, POLARIS11_, POLARIS11)
-CHIPSET(0x67E7, POLARIS11_, POLARIS11)
-CHIPSET(0x67E8, POLARIS11_, POLARIS11)
-CHIPSET(0x67E9, POLARIS11_, POLARIS11)
-CHIPSET(0x67EB, POLARIS11_, POLARIS11)
-CHIPSET(0x67EF, POLARIS11_, POLARIS11)
-CHIPSET(0x67FF, POLARIS11_, POLARIS11)
-
-CHIPSET(0x67C0, POLARIS10_, POLARIS10)
-CHIPSET(0x67C1, POLARIS10_, POLARIS10)
-CHIPSET(0x67C2, POLARIS10_, POLARIS10)
-CHIPSET(0x67C4, POLARIS10_, POLARIS10)
-CHIPSET(0x67C7, POLARIS10_, POLARIS10)
-CHIPSET(0x67C8, POLARIS10_, POLARIS10)
-CHIPSET(0x67C9, POLARIS10_, POLARIS10)
-CHIPSET(0x67CA, POLARIS10_, POLARIS10)
-CHIPSET(0x67CC, POLARIS10_, POLARIS10)
-CHIPSET(0x67CF, POLARIS10_, POLARIS10)
-CHIPSET(0x67DF, POLARIS10_, POLARIS10)
-
-CHIPSET(0x98E4, STONEY_, STONEY)
-
-CHIPSET(0x6980, POLARIS12_, POLARIS12)
-CHIPSET(0x6981, POLARIS12_, POLARIS12)
-CHIPSET(0x6985, POLARIS12_, POLARIS12)
-CHIPSET(0x6986, POLARIS12_, POLARIS12)
-CHIPSET(0x6987, POLARIS12_, POLARIS12)
-CHIPSET(0x6995, POLARIS12_, POLARIS12)
-CHIPSET(0x6997, POLARIS12_, POLARIS12)
-CHIPSET(0x699F, POLARIS12_, POLARIS12)
-
-CHIPSET(0x694C, VEGAM_, VEGAM)
-CHIPSET(0x694E, VEGAM_, VEGAM)
-
-CHIPSET(0x6860, VEGA10_, VEGA10)
-CHIPSET(0x6861, VEGA10_, VEGA10)
-CHIPSET(0x6862, VEGA10_, VEGA10)
-CHIPSET(0x6863, VEGA10_, VEGA10)
-CHIPSET(0x6864, VEGA10_, VEGA10)
-CHIPSET(0x6867, VEGA10_, VEGA10)
-CHIPSET(0x6868, VEGA10_, VEGA10)
-CHIPSET(0x687F, VEGA10_, VEGA10)
-CHIPSET(0x686C, VEGA10_, VEGA10)
-
-CHIPSET(0x69A0, VEGA12_, VEGA12)
-CHIPSET(0x69A1, VEGA12_, VEGA12)
-CHIPSET(0x69A2, VEGA12_, VEGA12)
-CHIPSET(0x69A3, VEGA12_, VEGA12)
-CHIPSET(0x69AF, VEGA12_, VEGA12)
-
-CHIPSET(0x15DD, RAVEN_, RAVEN)
Index: xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h
===================================================================
--- xorg-server-21.1.4.orig/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h
+++ xorg-server-21.1.4/hw/xfree86/dri2/pci_ids/vmwgfx_pci_ids.h
@@ -1 +1,2 @@
CHIPSET(0x0405, SVGAII, SVGAII)
+CHIPSET(0x0406, SVGAv3, SVGAv3)

View File

@ -0,0 +1,432 @@
From: Egbert Eich <eich@suse.de>
Date: Thu Sep 24 12:38:13 2015 +0200
Subject: [PATCH]vesa: Add VBEDPMSGetCapabilities & VBEDPMSGet()
Patch-mainline: to be upstreamed
References: bnc#947356
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/in10/vbe.c | 147 ++++++++++++++++++++++++++++++++++++++++++++++++++-
hw/xfree86/in10/vbe.h | 3 ++
2 files changed, 149 insertions(+), 1 deletion(-)
Index: xorg-server-21.1.0/hw/xfree86/int10/vbe.c
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/int10/vbe.c
+++ xorg-server-21.1.0/hw/xfree86/int10/vbe.c
@@ -20,6 +20,28 @@
#include "vbe.h"
#include <X11/extensions/dpmsconst.h>
+#ifdef DEBUG
+#define LOG_RESULT(x) { \
+ xf86DrvMsg(x->pInt10->pScrn->scrnIndex, X_INFO, "%s () = %s\n", \
+ __FUNCTION__, \
+ R16(x->pInt10->ax) == 0x4f ? "success" : "failure"); }
+
+#define LOG_SUCCESS(x) { \
+ xf86DrvMsg(x->pInt10->pScrn->scrnIndex, X_INFO, "%s () = success\n", \
+ __FUNCTION__); }
+#define LOG_FAILURE(x) { \
+ xf86DrvMsg(x->pInt10->pScrn->scrnIndex, X_INFO, "%s () = failure\n", \
+ __FUNCTION__); }
+#define LOG_VBE(x,fmt, args...) { \
+ xf86DrvMsg(x->pInt10->pScrn->scrnIndex, X_INFO, "%s " fmt, __FUNCTION__, \
+ ##args); }
+#else
+#define LOG_RESULT(x) {}
+#define LOG_SUCCESS(x) {}
+#define LOG_FAILURE(x) {}
+#define LOG_VBE(x,fmt, args...) {}
+#endif
+
#define VERSION(x) VBE_VERSION_MAJOR(x),VBE_VERSION_MINOR(x)
#if X_BYTE_ORDER == X_LITTLE_ENDIAN
@@ -187,6 +209,7 @@ vbeProbeDDC(vbeInfoPtr pVbe)
if (pVbe->ddc != DDC_UNCHECKED)
return TRUE;
+ LOG_VBE(pVbe,"()\n");
pVbe->pInt10->ax = 0x4F15;
pVbe->pInt10->bx = 0;
pVbe->pInt10->cx = 0;
@@ -195,6 +218,7 @@ vbeProbeDDC(vbeInfoPtr pVbe)
pVbe->pInt10->num = 0x10;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC not supported\n");
@@ -285,6 +309,7 @@ vbeReadEDID(vbeInfoPtr pVbe)
memset(page, 0, sizeof(vbeInfoPtr));
strcpy(page, vbeVersionString);
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->ax = 0x4F15;
pVbe->pInt10->bx = 0x01;
pVbe->pInt10->cx = 0;
@@ -294,6 +319,7 @@ vbeReadEDID(vbeInfoPtr pVbe)
pVbe->pInt10->num = 0x10;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE DDC invalid\n");
@@ -365,11 +391,13 @@ VBEGetVBEInfo(vbeInfoPtr pVbe)
((char *) pVbe->memory)[2] = 'E';
((char *) pVbe->memory)[3] = '2';
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f00;
pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return NULL;
@@ -458,6 +486,7 @@ VBESetVBEMode(vbeInfoPtr pVbe, int mode,
Output: AX = Status
(All other registers are preserved)
*/
+ LOG_VBE(pVbe, "(mode=0x%x)\n", mode);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f02;
pVbe->pInt10->bx = mode;
@@ -471,6 +500,7 @@ VBESetVBEMode(vbeInfoPtr pVbe, int mode,
pVbe->pInt10->bx &= ~(1 << 11);
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
return (R16(pVbe->pInt10->ax) == 0x4f);
}
@@ -488,10 +518,12 @@ VBEGetVBEMode(vbeInfoPtr pVbe, int *mode
BX := Current video mode
(All other registers are preserved)
*/
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f03;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) == 0x4f) {
*mode = R16(pVbe->pInt10->bx);
@@ -521,12 +553,14 @@ VBEGetModeInfo(vbeInfoPtr pVbe, int mode
AX := status
(All other registers are preserved)
*/
+ LOG_VBE(pVbe, "(mode = 0x%x)\n",mode);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f01;
pVbe->pInt10->cx = mode;
pVbe->pInt10->es = SEG_ADDR(pVbe->real_mode_base);
pVbe->pInt10->di = SEG_OFF(pVbe->real_mode_base);
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return NULL;
@@ -586,6 +620,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveR
(All other registers are preserved)
*/
+ LOG_VBE(pVbe, "(function = %d)", function);
if ((pVbe->version & 0xff00) > 0x100) {
int screen = pVbe->pInt10->pScrn->scrnIndex;
@@ -597,9 +632,9 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveR
pVbe->pInt10->dx = 0;
pVbe->pInt10->cx = 0x000f;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return FALSE;
-
if (function == MODE_SAVE) {
int npages = (R16(pVbe->pInt10->bx) * 64) / 4096 + 1;
@@ -618,6 +653,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveR
if (!*memory)
return FALSE;
+
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f04;
switch (function) {
@@ -635,6 +671,7 @@ VBESaveRestore(vbeInfoPtr pVbe, vbeSaveR
pVbe->pInt10->es = SEG_ADDR(*real_mode_pages);
pVbe->pInt10->bx = SEG_OFF(*real_mode_pages);
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
return (R16(pVbe->pInt10->ax) == 0x4f);
}
@@ -652,11 +689,13 @@ VBEBankSwitch(vbeInfoPtr pVbe, unsigned
Output:
*/
+ LOG_VBE(pVbe, "(bank = %d window = %d)\n", iBank, window);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f05;
pVbe->pInt10->bx = window;
pVbe->pInt10->dx = iBank;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return FALSE;
@@ -690,12 +729,14 @@ VBESetGetLogicalScanlineLength(vbeInfoPt
DX := Maximum Number of Scan Lines
*/
+ LOG_VBE(pVbe,"(width = %i)\n",width);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f06;
pVbe->pInt10->bx = command;
if (command == SCANWID_SET || command == SCANWID_SET_BYTES)
pVbe->pInt10->cx = width;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return FALSE;
@@ -715,12 +756,15 @@ VBESetGetLogicalScanlineLength(vbeInfoPt
Bool
VBESetDisplayStart(vbeInfoPtr pVbe, int x, int y, Bool wait_retrace)
{
+ LOG_VBE(pVbe, "(x = %i y = %i wait_retrace = %s)\n",
+ x, y, wait_retrace ? "y" : "n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f07;
pVbe->pInt10->bx = wait_retrace ? 0x80 : 0x00;
pVbe->pInt10->cx = x;
pVbe->pInt10->dx = y;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return FALSE;
@@ -731,10 +775,12 @@ VBESetDisplayStart(vbeInfoPtr pVbe, int
Bool
VBEGetDisplayStart(vbeInfoPtr pVbe, int *x, int *y)
{
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f07;
pVbe->pInt10->bx = 0x01;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return FALSE;
@@ -761,6 +807,7 @@ VBESetGetDACPaletteFormat(vbeInfoPtr pVb
BH := Current number of bits of color per primary
*/
+ LOG_VBE(pVbe, "(bits = %d)\n", bits);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f08;
if (!bits)
@@ -768,6 +815,7 @@ VBESetGetDACPaletteFormat(vbeInfoPtr pVb
else
pVbe->pInt10->bx = (bits & 0x00ff) << 8;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return 0;
@@ -805,6 +853,8 @@ VBESetGetPaletteData(vbeInfoPtr pVbe, Bo
DS := Selector for memory mapped registers
*/
+ LOG_VBE(pVbe,"(%s first = %i num = %i wait_retrace = %s)\n",
+ set ? "set" : "get", first, num, wait_retrace ? "y" : "n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f09;
if (!secondary)
@@ -818,6 +868,7 @@ VBESetGetPaletteData(vbeInfoPtr pVbe, Bo
if (set)
memcpy(pVbe->memory, data, num * sizeof(CARD32));
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return NULL;
@@ -850,11 +901,13 @@ VBEGetVBEpmi(vbeInfoPtr pVbe)
(All other registers are preserved)
*/
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f0a;
pVbe->pInt10->bx = 0;
pVbe->pInt10->di = 0;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return NULL;
@@ -967,6 +1020,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mo
AX := VBE Return Status
ECX := Closest pixel clock
*/
+ LOG_VBE(pVbe,"(mode = 0x%x clock = %d)\n", mode, clock);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f0b;
@@ -974,6 +1028,7 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mo
pVbe->pInt10->cx = clock;
pVbe->pInt10->dx = mode;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if (R16(pVbe->pInt10->ax) != 0x4f)
return 0;
@@ -981,6 +1036,92 @@ VBEGetPixelClock(vbeInfoPtr pVbe, int mo
return pVbe->pInt10->cx;
}
+int
+VBEDPMSGetCapabilities(vbeInfoPtr pVbe, int *cap)
+{
+ /*
+ Input:
+ AX := 4F10h DPMS
+ BL := 00h Get VBE/PM Capabilities
+ CX := 00h
+ ES:DI := 0
+
+ Output:
+ AX := Status
+ BH := Power Saving State 1=supported, 0=unsupported
+ Bit 0: stand by, Bit 1: suspend, Bit 2: off Bit 3: reduced
+ */
+ LOG_VBE(pVbe, "()\n");
+ pVbe->pInt10->num = 0x10;
+ pVbe->pInt10->ax = 0x4f10;
+ pVbe->pInt10->bx = 0x0;
+ pVbe->pInt10->cx = 0x0;
+ pVbe->pInt10->es = pVbe->pInt10->di = 0;
+ xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
+
+ if ((R16(pVbe->pInt10->ax) != 0x4f))
+ return FALSE;
+
+ xf86DrvMsgVerb(pVbe->pInt10->pScrn->scrnIndex, X_INFO, 7,
+ "DPMSGetCapabilities: 0x%x\n,",
+ pVbe->pInt10->bx);
+ *cap = 1 << DPMSModeOn; /* always supported */
+ if (pVbe->pInt10->bx & 0x100)
+ *cap |= 1 << DPMSModeStandby;
+ if (pVbe->pInt10->bx & 0x200)
+ *cap |= 1 << DPMSModeSuspend;
+ if (pVbe->pInt10->bx & 0x200)
+ *cap |= 1 << DPMSModeOff;
+
+ return TRUE;
+}
+
+int
+VBEDPMSGet(vbeInfoPtr pVbe, int *mode)
+{
+ /*
+ Input:
+ AX := 4F10h DPMS
+ BL := 02h Get Display Power State
+ CX := 00h
+
+ Output:
+ AX := VBE Return Status
+ BH := Power State currently set
+ */
+ LOG_VBE(pVbe, "()\n");
+ pVbe->pInt10->ax = 0x4f10;
+ pVbe->pInt10->bx = 0x2;
+ pVbe->pInt10->cx = 0x0;
+ xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
+ if ((R16(pVbe->pInt10->ax) != 0x4f))
+ return FALSE;
+
+ xf86DrvMsgVerb(pVbe->pInt10->pScrn->scrnIndex, X_INFO, 7,
+ "DPMSGetState: 0x%x\n,",
+ pVbe->pInt10->bx);
+ switch (pVbe->pInt10->bx >> 4) {
+ case 0:
+ *mode = DPMSModeOn;
+ break;
+ case 1:
+ *mode = DPMSModeStandby;
+ break;
+ case 2:
+ *mode = DPMSModeSuspend;
+ break;
+ case 4:
+ *mode = DPMSModeOff;
+ break;
+ case 8:
+ *mode = DPMSModeOn;
+ break;
+ }
+ return TRUE;
+}
+
Bool
VBEDPMSSet(vbeInfoPtr pVbe, int mode)
{
@@ -994,6 +1135,7 @@ VBEDPMSSet(vbeInfoPtr pVbe, int mode)
AX := VBE Return Status
*/
+ LOG_VBE(pVbe, "(mode = %d)\n", mode);
pVbe->pInt10->num = 0x10;
pVbe->pInt10->ax = 0x4f10;
pVbe->pInt10->bx = 0x01;
@@ -1011,6 +1153,7 @@ VBEDPMSSet(vbeInfoPtr pVbe, int mode)
break;
}
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
return (R16(pVbe->pInt10->ax) == 0x4f);
}
@@ -1059,6 +1202,7 @@ VBEReadPanelID(vbeInfoPtr pVbe)
void *tmp = NULL;
int screen = pVbe->pInt10->pScrn->scrnIndex;
+ LOG_VBE(pVbe, "()\n");
pVbe->pInt10->ax = 0x4F11;
pVbe->pInt10->bx = 0x01;
pVbe->pInt10->cx = 0;
@@ -1068,6 +1212,7 @@ VBEReadPanelID(vbeInfoPtr pVbe)
pVbe->pInt10->num = 0x10;
xf86ExecX86int10(pVbe->pInt10);
+ LOG_RESULT(pVbe);
if ((pVbe->pInt10->ax & 0xff) != 0x4f) {
xf86DrvMsgVerb(screen, X_INFO, 3, "VESA VBE PanelID invalid\n");
Index: xorg-server-21.1.0/hw/xfree86/int10/vbe.h
===================================================================
--- xorg-server-21.1.0.orig/hw/xfree86/int10/vbe.h
+++ xorg-server-21.1.0/hw/xfree86/int10/vbe.h
@@ -335,6 +335,9 @@ VBEVesaSaveRestore(vbeInfoPtr pVbe, vbeS
extern _X_EXPORT int VBEGetPixelClock(vbeInfoPtr pVbe, int mode, int Clock);
extern _X_EXPORT Bool VBEDPMSSet(vbeInfoPtr pVbe, int mode);
+#define VBE_HAVE_DPMS_GET_CAPABILITIES
+extern _X_EXPORT Bool VBEDPMSGetCapabilities(vbeInfoPtr pVbe, int *cap);
+extern _X_EXPORT Bool VBEDPMSGet(vbeInfoPtr pVbe, int *mode);
struct vbePanelID {
short hsize;

View File

@ -0,0 +1,27 @@
From 672050be2553afaac6810a4d85d8b5cf1656d380 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Mon, 13 Dec 2021 16:10:35 +0100
Subject: [PATCH] xf86: Accept devices with the 'hyperv_drm' driver.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
hw/xfree86/common/xf86platformBus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 45028f7a6..071f44b2a 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -560,6 +560,9 @@ xf86platformProbeDev(DriverPtr drvp)
if (ServerIsNotSeat0()) {
break;
} else {
+ /* Accept the device if the driver is hyperv_drm */
+ if (strcmp(xf86_platform_devices[j].attribs->driver, "hyperv_drm") == 0)
+ break;
/* Accept the device if the driver is simpledrm */
if (strcmp(xf86_platform_devices[j].attribs->driver, "simpledrm") == 0)
break;
--
2.34.1

View File

@ -0,0 +1,31 @@
From a7029faa7da778f9bab88d417e85041c631c87e6 Mon Sep 17 00:00:00 2001
From: Thomas Zimmermann <tzimmermann@suse.de>
Date: Wed, 18 May 2022 10:44:06 +0200
Subject: [PATCH] xf86: Accept devices with the kernels ofdrm driver
Add a workaround to accept devices of the kernel's ofdrm driver.
Makes Xorg work on Open Firmware's pre-configured display with the
DRM graphics stack.
Signed-off-by: Thomas Zimmermann <tzimmermann@suse.de>
---
hw/xfree86/common/xf86platformBus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/common/xf86platformBus.c b/hw/xfree86/common/xf86platformBus.c
index 071f44b2a..6a0c3177b 100644
--- a/hw/xfree86/common/xf86platformBus.c
+++ b/hw/xfree86/common/xf86platformBus.c
@@ -563,6 +563,9 @@ xf86platformProbeDev(DriverPtr drvp)
/* Accept the device if the driver is hyperv_drm */
if (strcmp(xf86_platform_devices[j].attribs->driver, "hyperv_drm") == 0)
break;
+ /* Accept the device if the driver is ofdrm */
+ if (strcmp(xf86_platform_devices[j].attribs->driver, "ofdrm") == 0)
+ break;
/* Accept the device if the driver is simpledrm */
if (strcmp(xf86_platform_devices[j].attribs->driver, "simpledrm") == 0)
break;
--
2.38.0

View File

@ -0,0 +1,33 @@
Author: Michal Srb <msrb@suse.com>
Subject: xfree86: Do not claim pci slots if fb slot is already claimed.
Patch-Mainline: To be upstreamed
References: bsc#1119431
The xf86PostProbe would terminate with fatal error if both fb and pci
slot were claimed at the same time, so there is no point in trying.
The opposite logic is already implemented - fb slots will not be claimed
if a pci slot was claimed.
This fixes issue with xf86-video-fbdev and xf86-video-vesa activating at
the same time (when /dev/fb0 is provided by the vesafb kernel driver).
---
hw/xfree86/common/xf86pciBus.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/hw/xfree86/common/xf86pciBus.c b/hw/xfree86/common/xf86pciBus.c
index 0718cdcb0..24396a63c 100644
--- a/hw/xfree86/common/xf86pciBus.c
+++ b/hw/xfree86/common/xf86pciBus.c
@@ -212,6 +212,9 @@ xf86ClaimPciSlot(struct pci_device *d, DriverPtr drvp,
EntityPtr p = NULL;
int num;
+ if (fbSlotClaimed)
+ return -1;
+
if (xf86CheckPciSlot(d)) {
num = xf86AllocateEntity();
p = xf86Entities[num];
--
2.16.4

View File

@ -0,0 +1,267 @@
From 358448649d39b6cf4de49c0f65ce2b5f4c702c65 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Sun, 2 Jan 2022 01:27:31 +0200
Subject: [PATCH xserver] xfree86: activate GPU screens on autobind
Part of the original patch by Dave Airlie has landed
078277e4d92f05a90c4715d61b89b9d9d38d68ea, this contains the remainder of
what was in SUSE before Xorg 21.1.
Signed-off-by: Dave Airlie <airlied@gmail.com>
---
dix/main.c | 4 +
hw/xfree86/common/xf86Init.c | 185 +++++++++++++++++++++++++++++++++++
include/dix.h | 2 +
3 files changed, 191 insertions(+)
diff --git a/dix/main.c b/dix/main.c
index bfc8addbe..c7b8ed49e 100644
--- a/dix/main.c
+++ b/dix/main.c
@@ -121,6 +121,8 @@ extern void Dispatch(void);
CallbackListPtr RootWindowFinalizeCallback = NULL;
+CallbackListPtr RootWindowInitialized = NULL;
+
int
dix_main(int argc, char *argv[], char *envp[])
{
@@ -242,6 +244,8 @@ dix_main(int argc, char *argv[], char *envp[])
for (i = 0; i < screenInfo.numScreens; i++)
InitRootWindow(screenInfo.screens[i]->root);
+ CallCallbacks(&RootWindowInitialized, NULL);
+
InitCoreDevices();
InitInput(argc, argv);
InitAndStartDevices();
diff --git a/hw/xfree86/common/xf86Init.c b/hw/xfree86/common/xf86Init.c
index 380288ca4..9839cb19c 100644
--- a/hw/xfree86/common/xf86Init.c
+++ b/hw/xfree86/common/xf86Init.c
@@ -204,6 +204,9 @@ xf86HasTTYs(void)
#endif
}
+static void
+xf86AutoConfigProviderOutputs(CallbackListPtr *pcbl, void *data, void *call_data);
+
static void
xf86AutoConfigOutputDevices(void)
{
@@ -217,6 +220,8 @@ xf86AutoConfigOutputDevices(void)
RRProviderAutoConfigGpuScreen(xf86ScrnToScreen(xf86GPUScreens[i]),
xf86ScrnToScreen(xf86Screens[scrnum]));
}
+
+ AddCallback(&RootWindowInitialized, xf86AutoConfigProviderOutputs, NULL);
}
static void
@@ -258,6 +263,189 @@ AddVTAtoms(CallbackListPtr *pcbl, void *data, void *screen)
"Failed to register VT properties\n");
}
+
+/*
+ * This function activates all outputs of all GPU screens associated with the
+ * given master screen and sets them to their preferred resolution next to
+ * each other left-to-right.
+ */
+static void
+xf86AutoConfigureProviderOutputsForMaster(ScreenPtr pMasterScreen)
+{
+ ScreenPtr pScreen;
+ rrScrPrivPtr pMasterScrPriv, pScrPriv;
+ RROutputPtr pOutput;
+ RRCrtcPtr pCrtc;
+ RRCrtcPtr *pUsedCrtcs;
+ int usedCrtcsCount;
+ int screenWidth, screenHeight, screenWidthMM, screenHeightMM;
+ int i, j, k, l;
+
+ struct OutputConfig {
+ RROutputPtr pOutput;
+ RRCrtcPtr pCrtc;
+
+ int x;
+ int y;
+ } *outputConfigs;
+ int outputConfigsCount = 0, outputConfigsUsed = 0;
+
+ if (!dixPrivateKeyRegistered(rrPrivKey))
+ return;
+
+ pMasterScrPriv = rrGetScrPriv(pMasterScreen);
+ if (!pMasterScrPriv)
+ return;
+
+ // Count the potential maximum of outputs that we will try to auto configure
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ pScreen = xf86GPUScreens[i]->pScreen;
+ if (pScreen->current_primary != pMasterScreen || !pScreen->is_output_secondary)
+ continue;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ continue;
+
+ outputConfigsCount += pScrPriv->numOutputs;
+ }
+
+ if (outputConfigsCount == 0)
+ return;
+
+ outputConfigs = calloc(outputConfigsCount, sizeof(*outputConfigs));
+
+ screenWidth = 0;
+ screenHeight = 0;
+
+ // Consider the master's own outputs/crtcs that were already configured
+ for (i = 0; i < pMasterScrPriv->numCrtcs; i++) {
+ if (!pMasterScrPriv->crtcs[i]->mode)
+ continue;
+
+ screenWidth = max(screenWidth, pMasterScrPriv->crtcs[i]->x + pMasterScrPriv->crtcs[i]->mode->mode.width);
+ screenHeight = max(screenHeight, pMasterScrPriv->crtcs[i]->y + pMasterScrPriv->crtcs[i]->mode->mode.height);
+ }
+
+ // Now add as many outputs from slave GPUs as we can next to it
+ for (i = 0; i < xf86NumGPUScreens; i++) {
+ pScreen = xf86GPUScreens[i]->pScreen;
+ if (pScreen->current_primary != pMasterScreen || !pScreen->is_output_secondary)
+ continue;
+
+ pScrPriv = rrGetScrPriv(pScreen);
+ if (!pScrPriv)
+ continue;
+
+ pUsedCrtcs = calloc(pScrPriv->numCrtcs, sizeof(*pUsedCrtcs));
+ if (!pUsedCrtcs)
+ continue;
+
+ usedCrtcsCount = 0;
+
+ for (j = 0; j < pScrPriv->numOutputs; j++) {
+ pOutput = pScrPriv->outputs[j];
+
+ if (pOutput->connection != RR_Connected ||
+ pOutput->nonDesktop ||
+ pOutput->numModes == 0 ||
+ pOutput->numCrtcs == 0)
+ continue;
+
+ if (screenWidth + pOutput->modes[0]->mode.width > pMasterScrPriv->maxWidth ||
+ screenHeight + pOutput->modes[0]->mode.height > pMasterScrPriv->maxHeight)
+ {
+ // It can't fit into the maximal size, skip
+ continue;
+ }
+
+ for (k = 0; k < pOutput->numCrtcs; k++) {
+ pCrtc = pOutput->crtcs[k];
+ for (l = 0; l < usedCrtcsCount; l++) {
+ if (pCrtc == pUsedCrtcs[l]) {
+ pCrtc = NULL;
+ break;
+ }
+ }
+ if (pCrtc) {
+ break;
+ }
+ }
+
+ if (!pCrtc) {
+ // No more free CRTCs to setup this output, skip
+ continue;
+ }
+
+ pUsedCrtcs[usedCrtcsCount] = pCrtc;
+ usedCrtcsCount++;
+
+ assert(outputConfigsUsed < outputConfigsCount);
+ outputConfigs[outputConfigsUsed].pOutput = pOutput;
+ outputConfigs[outputConfigsUsed].pCrtc = pCrtc;
+ outputConfigs[outputConfigsUsed].x = screenWidth;
+ outputConfigs[outputConfigsUsed].y = 0;
+ outputConfigsUsed++;
+
+ screenWidth += pOutput->modes[0]->mode.width;
+ screenHeight += pOutput->modes[0]->mode.height;
+ }
+
+ free(pUsedCrtcs);
+ }
+
+ if (outputConfigsUsed == 0)
+ goto out;
+
+ if (screenWidth < pMasterScrPriv->minWidth)
+ screenWidth = pMasterScrPriv->minWidth;
+ if (screenHeight < pMasterScrPriv->minHeight)
+ screenHeight = pMasterScrPriv->minHeight;
+
+ if (pMasterScrPriv->mmWidth > 0 &&
+ pMasterScrPriv->mmHeight > 0 &&
+ pMasterScrPriv->width > 0 &&
+ pMasterScrPriv->height > 0)
+ {
+ // If the master screen already has some DPI, keep it
+ screenWidthMM = pMasterScrPriv->mmWidth * screenWidth / pMasterScreen->width;
+ screenHeightMM = pMasterScrPriv->mmHeight * screenHeight / pMasterScreen->height;
+ } else {
+ assert(outputConfigsUsed > 0);
+ // Otherwise use DPI of the first output
+ screenWidthMM = outputConfigs[0].pOutput->mmWidth * screenWidth / outputConfigs[0].pOutput->modes[0]->mode.width;
+ screenHeightMM = outputConfigs[0].pOutput->mmHeight * screenHeight / outputConfigs[0].pOutput->modes[0]->mode.height;
+ }
+
+ if (!RRScreenSizeSet(pMasterScreen, screenWidth, screenHeight, screenWidthMM, screenHeightMM))
+ goto out;
+
+ for (i = 0; i < outputConfigsUsed; i++) {
+ RRCrtcSet(
+ outputConfigs[i].pCrtc,
+ outputConfigs[i].pOutput->modes[0],
+ outputConfigs[i].x,
+ outputConfigs[i].y,
+ RR_Rotate_0,
+ 1,
+ &outputConfigs[i].pOutput
+ );
+ }
+
+out:
+ free(outputConfigs);
+}
+
+static void
+xf86AutoConfigProviderOutputs(CallbackListPtr *pcbl, void *data, void *call_data)
+{
+ int i;
+
+ for (i = 0; i < xf86NumScreens; i++) {
+ xf86AutoConfigureProviderOutputsForMaster(xf86Screens[i]->pScreen);
+ }
+}
+
static Bool
xf86ScreenInit(ScreenPtr pScreen, int argc, char **argv)
{
diff --git a/include/dix.h b/include/dix.h
index 0dcd09b65..ecc73d1d9 100644
--- a/include/dix.h
+++ b/include/dix.h
@@ -620,6 +620,8 @@ typedef struct {
extern _X_EXPORT CallbackListPtr RootWindowFinalizeCallback;
+extern _X_EXPORT CallbackListPtr RootWindowInitialized;
+
extern int
XItoCoreType(int xi_type);
extern Bool
--
2.25.1

44
u_xorg-server-xdmcp.patch Normal file
View File

@ -0,0 +1,44 @@
Author: Reinhard Max <max@suse.de>
XDMCP: For IPv6 add IPv6 link local addresses to the end of the list
For IPv6 add a link local addresses to the end of the list passed to
the XDMCP servers.
Reason: for link local addresses the XDMCP server would need to either
know the interface thru a scope identifier or try all available interfaces.
If they don't this address will fail in which case the XDMCP server
could still try the other addresses passed - however some only try
the first address and then give up.
Even if this seems to be the wrong place to fix this it seems to be
easier than fixing all display servers.
Index: xorg-server-1.20.5/os/access.c
===================================================================
--- xorg-server-1.20.5.orig/os/access.c
+++ xorg-server-1.20.5/os/access.c
@@ -827,7 +827,9 @@ DefineSelf(int fd)
/*
* ignore 'localhost' entries as they're not useful
- * on the other end of the wire
+ * on the other end of the wire and because on hosts
+ * with shared home dirs they'll result in conflicting
+ * entries in ~/.Xauthority
*/
if (ifr->ifa_flags & IFF_LOOPBACK)
continue;
@@ -848,6 +850,14 @@ DefineSelf(int fd)
else if (family == FamilyInternet6 &&
IN6_IS_ADDR_LOOPBACK((struct in6_addr *) addr))
continue;
+
+ /* Ignore IPv6 link local addresses (fe80::/10), because
+ * they need a scope identifier, which we have no way
+ * of telling to the other end.
+ */
+ if (family == FamilyInternet6 &&
+ IN6_IS_ADDR_LINKLOCAL((struct in6_addr *)addr))
+ continue;
#endif
XdmcpRegisterConnection(family, (char *) addr, len);
#if defined(IPv6) && defined(AF_INET6)

View File

@ -0,0 +1,78 @@
From: Egbert Eich <eich@suse.de>
Date: Tue Apr 12 15:52:37 2016 +0200
Subject: [PATCH]xorg-wrapper: Drop supplemental group IDs
Patch-mainline: to be upstreamed
References:
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/xorg-wrapper.c | 48 +++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 48 insertions(+)
Index: xorg-server-1.20.5/hw/xfree86/xorg-wrapper.c
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/xorg-wrapper.c
+++ xorg-server-1.20.5/hw/xfree86/xorg-wrapper.c
@@ -35,6 +35,8 @@
#include <string.h>
#include <sys/ioctl.h>
#include <sys/stat.h>
+#include <pwd.h>
+#include <grp.h>
#ifdef HAVE_SYS_SYSMACROS_H
#include <sys/sysmacros.h>
#endif
@@ -255,6 +257,52 @@ int main(int argc, char *argv[])
if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
gid_t realgid = getgid();
uid_t realuid = getuid();
+ int ngroups = 0;
+ gid_t *groups = NULL;
+ long int initlen = sysconf(_SC_GETPW_R_SIZE_MAX);
+ size_t len;
+ struct passwd result, *resultp;
+ char *buffer;
+ int e;
+
+ if (initlen == -1)
+ len = 1024;
+ else
+ len = (size_t) initlen;
+ if ((buffer = malloc(len)) < 0) {
+ fprintf(stderr, "%s: Could not allocate memory: %s\n",
+ progname, strerror(errno));
+ exit (1);
+ }
+ if ((e = getpwuid_r(realuid, &result, buffer, len, &resultp)) > 0) {
+ fprintf(stderr, "%s: Could not get user name: %s\n",
+ progname, strerror(errno));
+ exit (1);
+ } else if (resultp == NULL) {
+ fprintf(stderr, "%s: Could not find user name for UID %d\n",
+ progname, realuid);
+ exit (1);
+ }
+ if (getgrouplist(result.pw_name, realgid, groups, &ngroups) < 0) {
+ if ((groups = malloc(sizeof(gid_t) * ngroups)) == NULL) {
+ fprintf(stderr, "%s: Could not allocate memory: %s\n",
+ progname, strerror(errno));
+ exit (1);
+ }
+ if (getgrouplist(result.pw_name, realgid, groups, &ngroups) < 0) {
+ fprintf(stderr, "%s: Could not get supplementary group list\n",
+ progname);
+ ngroups = 0;
+ }
+ }
+ if (setgroups(ngroups, groups) == -1) {
+ fprintf(stderr, "%s: Could not set groups: %s\n",
+ progname, strerror(errno));
+ exit (1);
+ }
+ memset(buffer, 0, len);
+ free(buffer);
+ free(groups);
if (setresgid(-1, realgid, realgid) != 0) {
fprintf(stderr, "%s: Could not drop setgid privileges: %s\n",

View File

@ -0,0 +1,96 @@
--- xserver-1.20.9/hw/xfree86/xorg-wrapper.c
+++ xserver-1.20.9/hw/xfree86/xorg-wrapper.c 2020-09-29 12:52:59.256970275 +0200
@@ -191,6 +191,60 @@
return 0;
}
+static int check_vt_range(long int vt)
+{
+ if (vt >= 2 && vt <= 7 ) {
+ return 1;
+ }
+
+ return 0;
+}
+
+/* Xserver option whitelist filter (boo#1175867) */
+static int option_filter(int argc, char* argv[]){
+
+ for(int pos=1; pos<argc; pos++) {
+ const char *arg = argv[pos];
+
+ if (strlen(arg) == 3 && !strncmp(arg,"vt", 2) && check_vt_range(strtol(arg+2, NULL, 10)) == 1) {
+ /* vtX (vt2-vt7) */
+ continue;
+ } else if(!strcmp(arg,"-displayfd") ||
+ !strcmp(arg,"-auth") ||
+ !strcmp(arg,"-background") ||
+ !strcmp(arg,"-verbose") ||
+ !strcmp(arg,"-listen")) {
+ /* -displayfd x
+ -auth xxxx
+ -backgound none
+ -verbose 7 (7 or 3)
+ -listen tcp
+ */
+ if ((pos+1) < argc) {
+ pos++;
+ } else {
+ fprintf(stderr, "%s: Missing argument for Xserver option \"%s\". Aborting.\n",
+ progname, arg);
+ return 0;
+ }
+ } else if (!strcmp(arg,"-noreset") ||
+ !strcmp(arg,"-keeptty") ||
+ !strcmp(arg,"-core")) {
+ /* -noreset
+ -keeptty
+ -core
+ */
+ continue;
+ } else {
+ fprintf(stderr, "%s: Xserver option \"%s\" invalid or not in whitelist. Aborting.\n",
+ progname, arg);
+ return 0;
+ }
+ }
+
+ return 1;
+}
+
int main(int argc, char *argv[])
{
#ifdef WITH_LIBDRM
@@ -250,11 +304,14 @@
close(fd);
}
+ /* If we've found cards, and all cards support kms, drop root rights */
+ if (total_cards && kms_cards == total_cards) {
+ needs_root_rights = 0;
+ }
}
#endif
- /* If we've found cards, and all cards support kms, drop root rights */
- if (needs_root_rights == 0 || (total_cards && kms_cards == total_cards)) {
+ if (needs_root_rights == 0) {
gid_t realgid = getgid();
uid_t realuid = getuid();
int ngroups = 0;
@@ -326,6 +383,15 @@
}
argv[0] = buf;
+
+ if (needs_root_rights == 1 && getuid() != 0)
+ {
+ /* Xserver option whitelist filter (boo#1175867) */
+ if (option_filter(argc, argv) == 0) {
+ exit(1);
+ }
+ }
+
if (getuid() == geteuid())
(void) execv(argv[0], argv);
else

View File

@ -0,0 +1,24 @@
From: Egbert Eich <eich@suse.de>
Date: Tue Apr 12 15:53:11 2016 +0200
Subject: [PATCH]xorg-wrapper/build: Build position independent code
Patch-mainline: to be upstreamed
References:
Signed-off-by: Egbert Eich <eich@suse.com>
Signed-off-by: Egbert Eich <eich@suse.de>
---
hw/xfree86/Makefile.am | 1 +
1 file changed, 1 insertion(+)
Index: xorg-server-1.20.5/hw/xfree86/Makefile.am
===================================================================
--- xorg-server-1.20.5.orig/hw/xfree86/Makefile.am
+++ xorg-server-1.20.5/hw/xfree86/Makefile.am
@@ -92,6 +92,7 @@ if SUID_WRAPPER
wrapexecdir = $(SUID_WRAPPER_DIR)
wrapexec_PROGRAMS = Xorg.wrap
Xorg_wrap_SOURCES = xorg-wrapper.c
+Xorg_wrap_CFLAGS = $(AM_CFLAGS) -pie -fpie
endif
BUILT_SOURCES = xorg.conf.example

1
xkb-tmpfiles.conf Normal file
View File

@ -0,0 +1 @@
C /var/lib/xkb/compiled/README.compiled 0644 - - - /usr/share/factory/var/lib/xkb/compiled/README.compiled

127
xorg-backtrace Normal file
View File

@ -0,0 +1,127 @@
#!/usr/bin/perl
$version = "1.0";
$timeout = 5;
@pkgs = ( "xorg-x11-server", "xorg-x11-driver-video", "xorg-x11-driver-input",
"libpixman-1-0", "libpciaccess0" );
$xtracmds= "/etc/X11/xorg-backtrace-cmds";
$pid=$ARGV[0];
if ($pid == 0) {
print "Usage: $0 <pid>\n";
exit 1;
}
if (! -e "/usr/bin/gdb") {
print "Install gdb to get reasonable backtraces\n";
exit 2;
}
$SIG{ALRM} = sub { die "timeout starting gdb" };
alarm $timeout;
open STDERR, ">&STDOUT";
use FileHandle;
use IPC::Open2;
$gdb = open2 (*R, *W, "/usr/bin/gdb -n -p $pid");
$SIG{ALRM} = sub { kill QUIT, $gdb; sleep 1; kill KILL, $gdb; die "timeout using gdb" };
alarm $timeout;
print "\n==================== GDB Backtrace ============\n\n";
print "Done by $0 V$version\n\n";
$needpkgs=0;
for $p (@pkgs) {
next if system ("rpm", "-q", "--quiet", "$p-debuginfo") == 0 &&
system ("rpm", "-q", "--quiet", "$p-debugsource") == 0;
print "Install following debug packages to improve backtrace:\n" unless $needpkgs;
$needpkgs++;
print "\t$p-debug*\n";
}
print "\n" if $needpkgs;
print W "set prompt\necho \\n===info\\n\n";
#print W "info files\necho ===files\\n\n";
print W "thread apply all bt full\necho ===btend\\n\n";
$_=<R>; # GNU gdb version
print;
while (<R>) {
last if /^===info/;
print if /^This GDB was configured as/;
}
#print "\n==================== Files ====================\n\n";
#while (<R>) {
# last if /^===files/;
# print;
#}
print "\n==================== Backtrace ================\n";
$fno = "";
$fls = 0;
$o = "";
$use = 0;
while (<R>) {
last if /^===btend/;
if (/^#(\d+)\s/) {
$fno = $1;
$o .= "\n";
$o .= "===l".($fno-1)."\n" if $use;
$o .= "\n";
$fls = $fno+1 if /\bxorg_backtrace \(/ || /\bOsSigHandler \(/;
$use = 1;
}
$line{$fno} = $1 if $line{$fno} == 0 && /:(\d+)\s*$/;
$o .= $_;
$use = 0 if /^No symbol table info available/;
}
$o .="\n===l$fno";
for $i ($fls..$fno) {
print W "frame $i\necho ===fs$i\\n\nlist\necho ===fe$i\\n\n";
while (<R>) {
last if /^===fs$i\b/;
}
$r = "";
while (<R>) {
last if /^===fe$i\b/;
$r .= $_;
}
if ($line{$i} > 0) {
$r =~ s/^$line{$i}\b/$line{$i} */m;
}
$o =~ s/^===l$i$/$r/m;
}
if ($fls > 0) {
for $i (0..$fls-1) {
$o =~ s/^(#$i\s.*?)\n.*?\n#/$1\n\n#/ms;
}
}
$o =~ s/^===l.*$//mg;
print "$o";
if (-e $xtracmds) {
print W "source -v $xtracmds\necho ===cmds\\n\n";
print "\n==================== Extra Commands ===========\n\n";
while (<R>) {
last if /^===cmds/;
print unless /^\+echo ===cmds/;
}
}
print "\n==================== Backtrace End ============\n\n";
close R;
close W;
exit 0;

BIN
xorg-server-21.1.11.tar.gz (Stored with Git LFS) Normal file

Binary file not shown.

Binary file not shown.

4
xorg-server-provides Normal file
View File

@ -0,0 +1,4 @@
Provides: X11_ABI_XINPUT = 24.4
Provides: X11_ABI_VIDEODRV = 25.2
Provides: X11_ABI_ANSIC = 0.4
Provides: X11_ABI_EXTENSION = 10.0

View File

@ -0,0 +1,36 @@
From 1f679da30a33f3ddad14bc6b2be0795160ae12b8 Mon Sep 17 00:00:00 2001
From: Adam Jackson <ajax@redhat.com>
Date: Thu, 9 Apr 2015 10:19:13 -0400
Subject: [PATCH] include: Fix endianness setup
Need to make sure X_{BIG,LITTLE}_ENDIAN actually get defined
Signed-off-by: Adam Jackson <ajax@redhat.com>
---
include/dix-config.h.in | 1 +
include/xorg-server.h.in | 1 +
2 files changed, 2 insertions(+)
Index: xorg-server-1.20.5/include/dix-config.h.in
===================================================================
--- xorg-server-1.20.5.orig/include/dix-config.h.in
+++ xorg-server-1.20.5/include/dix-config.h.in
@@ -487,6 +487,7 @@
/* byte order */
#undef X_BYTE_ORDER
+#include <X11/Xarch.h>
/* Listen on TCP socket */
#undef LISTEN_TCP
Index: xorg-server-1.20.5/include/xorg-server.h.in
===================================================================
--- xorg-server-1.20.5.orig/include/xorg-server.h.in
+++ xorg-server-1.20.5/include/xorg-server.h.in
@@ -218,5 +218,6 @@
/* byte order */
#undef X_BYTE_ORDER
+#include <X11/Xarch.h>
#endif /* _XORG_SERVER_H_ */

5760
xorg-x11-server.changes Normal file

File diff suppressed because it is too large Load Diff

204
xorg-x11-server.keyring Normal file
View File

@ -0,0 +1,204 @@
-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: GnuPG v2
mQGiBEab+moRBACDH5yKqS3wcc5bdxY7PBNuwKvF5TKMfagmSvuRDtZjjIIWaA/n
Z1KboV9Gq5g7kP7+Kfu+Qgd8u65eVsW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SHwiRoxGkRUQttYv
Lh/NrtLo8a6NQFWAePMM8nU2P7n6AcRf357nqbwnQWJ/TyvCXQQYEQIAHRYhBGfc
hvJiP8X9S7UiXRRwbb4eS0VABQJfHuPcAAoJEBRwbb4eS0VAnL4Anim4vNYyrDc8
NTdS3mgWGtdXVjWdAKCjUhzkN3uCaYNJR6h0Y1thYuPEJMJMBBgRAgAMBQJGo8tj
BQkaVB2nAAoJEBRwbb4eS0VA5e0AoO/nFK4k4fsAgsLMs02kk3plifoAAJ4iK85P
2PawnJlnupv80Q8b7w2UVcJMBBgRAgAMBQJEXdJJBQkJZgGAAAoJEBRwbb4eS0VA
ugQAoOlJ2NPM8mRqRCA2ZKXPqz7TGm64AKCTLcYRDmqX4aZcgK4yRBbe8GXhDA==
=rEW/
-----END PGP PUBLIC KEY BLOCK-----

17
xorg-x11-server.macros.in Normal file
View File

@ -0,0 +1,17 @@
# RPM macros for XOrg ABI Definitions
# Add a Requires for the correct VIDEO Driver ABI
%x11_abi_videodrv_req \
Requires: X11_ABI_VIDEODRV = @abi_videodrv@
%x11_abi_xinput_req \
Requires: X11_ABI_XINPUT = @abi_xinput@
%x11_abi_ansic_req \
Requires: X11_ABI_ANSIC = @abi_ansic@
%x11_abi_extension_req \
Requires: X11_ABI_EXTENSION = @abi_extension@
%x11_abi_has_dpms_get_capabilities \
Requires: X11_ABI_HAS_DPMS_GET_CAPABILITIES

641
xorg-x11-server.spec Normal file
View File

@ -0,0 +1,641 @@
#
# spec file for package xorg-x11-server
#
# Copyright (c) 2024 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
#Compat macro for new _fillupdir macro introduced in Nov 2017
%if ! %{defined _fillupdir}
%define _fillupdir /var/adm/fillup-templates
%endif
%define pci_ids_dir %{_datadir}/X11/xorg_pci_ids
# now built separately in xwayland pkg with more recent sources (boo#1182677)
%define have_wayland 0
%define build_suid_wrapper 1
%if 0%{?build_suid_wrapper:1}
%if 0%{?suse_version} >= 1550
%define suid_wrapper_dir %{_bindir}
%else
%define build_suid_wrapper 0
%endif
%endif
Name: xorg-x11-server
Version: 21.1.11
Release: 0
URL: http://xorg.freedesktop.org/
Summary: X
License: MIT
Group: System/X11/Servers/XF86_4
Source0: https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-%{version}.tar.gz
Source10: https://xorg.freedesktop.org/archive/individual/xserver/xorg-server-%{version}.tar.gz.sig
Source11: xorg-x11-server.keyring
Source1: sysconfig.displaymanager.template
Source2: README.updates
Source3: xorgcfg.tar.bz2
Source4: xorg-backtrace
Source5: 50-extensions.conf
Source6: modesetting.ids
Source7: xkb-tmpfiles.conf
# RPM Macros to be installed. The ABI Versions will be injected by configure.
Source90: xorg-x11-server.macros.in
# Source91 and Source99 are used to ensure proper ABI provides.
Source91: xorg-server-provides
Source92: pre_checkin.sh
BuildRequires: bison
BuildRequires: flex
BuildRequires: libtool
BuildRequires: pkgconfig
BuildRequires: systemd-rpm-macros
BuildRequires: pkgconfig(bigreqsproto) >= 1.1.0
BuildRequires: pkgconfig(compositeproto)
BuildRequires: pkgconfig(damageproto) >= 1.1
BuildRequires: pkgconfig(dbus-1) >= 1.0
BuildRequires: pkgconfig(dri) >= 7.8.0
BuildRequires: pkgconfig(dri2proto)
BuildRequires: pkgconfig(dri3proto)
BuildRequires: pkgconfig(egl)
BuildRequires: pkgconfig(epoxy) >= 1.1
%if 0%{?have_wayland} == 1
BuildRequires: pkgconfig(wayland-client)
BuildRequires: pkgconfig(wayland-protocols)
%endif
BuildRequires: pkgconfig(fixesproto) >= 4.1
BuildRequires: pkgconfig(fontconfig)
BuildRequires: pkgconfig(fontenc)
BuildRequires: pkgconfig(fontsproto)
BuildRequires: pkgconfig(fontutil)
BuildRequires: pkgconfig(freetype2)
BuildRequires: pkgconfig(gbm)
BuildRequires: pkgconfig(gl)
BuildRequires: pkgconfig(glproto)
BuildRequires: pkgconfig(ice)
BuildRequires: pkgconfig(inputproto) >= 1.9.99.902
BuildRequires: pkgconfig(kbproto) >= 1.0.3
BuildRequires: pkgconfig(libdrm)
BuildRequires: pkgconfig(libsystemd)
BuildRequires: pkgconfig(libxcvt)
BuildRequires: pkgconfig(openssl)
BuildRequires: pkgconfig(pciaccess) >= 0.8.0
BuildRequires: pkgconfig(pixman-1) >= 0.24
BuildRequires: pkgconfig(presentproto)
BuildRequires: pkgconfig(randrproto) >= 1.5.0
BuildRequires: pkgconfig(renderproto) >= 0.11
BuildRequires: pkgconfig(resourceproto)
BuildRequires: pkgconfig(scrnsaverproto)
BuildRequires: pkgconfig(sm)
BuildRequires: pkgconfig(x11)
BuildRequires: pkgconfig(xau)
BuildRequires: pkgconfig(xaw7)
BuildRequires: pkgconfig(xcb-aux)
BuildRequires: pkgconfig(xcb-icccm)
BuildRequires: pkgconfig(xcb-image)
BuildRequires: pkgconfig(xcb-keysyms)
BuildRequires: pkgconfig(xcb-renderutil)
BuildRequires: pkgconfig(xcmiscproto) >= 1.2.0
BuildRequires: pkgconfig(xdmcp)
BuildRequires: pkgconfig(xext) >= 1.0.99.4
BuildRequires: pkgconfig(xextproto) >= 7.1.99
BuildRequires: pkgconfig(xf86dgaproto)
BuildRequires: pkgconfig(xf86driproto)
BuildRequires: pkgconfig(xf86vidmodeproto)
BuildRequires: pkgconfig(xfixes)
BuildRequires: pkgconfig(xfont2)
BuildRequires: pkgconfig(xi) >= 1.2.99.1
BuildRequires: pkgconfig(xineramaproto)
BuildRequires: pkgconfig(xkbcomp)
BuildRequires: pkgconfig(xkbfile)
BuildRequires: pkgconfig(xmu)
BuildRequires: pkgconfig(xorg-macros)
BuildRequires: pkgconfig(xpm)
BuildRequires: pkgconfig(xproto) >= 7.0.31
BuildRequires: pkgconfig(xrender)
BuildRequires: pkgconfig(xres)
BuildRequires: pkgconfig(xshmfence)
BuildRequires: pkgconfig(xt)
BuildRequires: pkgconfig(xtrans) >= 1.3.1
BuildRequires: pkgconfig(xtst) >= 1.0.99.2
BuildRequires: pkgconfig(xv)
### udev support (broken on openSUSE 11.2, see also bnc #589997)
%if 0%{?suse_version} >= 1130
BuildRequires: pkgconfig(libudev) >= 143
%endif
Requires(pre): %fillup_prereq
Requires: pkgconfig
Requires: xkbcomp
Recommends: xorg-x11-fonts-core
Requires: libpixman-1-0 >= 0.24
%(cat %{SOURCE91})
Requires: Mesa
%if 0%{?suse_version} >= 1315
Requires(post): update-alternatives
Requires(postun):update-alternatives
%endif
Provides: xorg-x11-server-glx
Obsoletes: xorg-x11-server-glx
Provides: glamor = %{version}
Provides: glamor-egl = %{version}
Obsoletes: glamor < %{version}
Obsoletes: glamor < 7.6_%{version}
Obsoletes: glamor-egl < %{version}
Obsoletes: glamor-egl < 7.6_%{version}
Provides: xf86-video-modesetting = %{version}
Obsoletes: xf86-video-modesetting < %{version}
Obsoletes: xf86-video-modesetting < 7.6_%{version}
%if 0%{?suse_version} >= 1500
Provides: xf86-video-ast
Obsoletes: xf86-video-ast
Provides: xf86-video-cirrus
Obsoletes: xf86-video-cirrus
%endif
Provides: xorg-x11-server = 7.6_%{version}
Obsoletes: xorg-x11-server < 7.6_%{version}
# get rid of meta packages still requiring/recommending obsolete
# drivers packages (boo#1121525)
%if 0%{?suse_version} >= 1500
Provides: xorg-x11-driver-input = 7.6_1
Obsoletes: xorg-x11-driver-input < 7.6_1
Provides: xorg-x11-driver-video = 7.6_1
Obsoletes: xorg-x11-driver-video < 7.6_1
%endif
# Remove (also from depending driver(s)) when updating X11_ABI_VIDEODRV by updating the server package - NOTE: also remove from xorg-x11-server.macros.in !
Provides: X11_ABI_HAS_DPMS_GET_CAPABILITIES
Requires: xkeyboard-config
# Install it by default; otherwise we run into too much package build failures
# when Xvfb is being used for testing ...
# Unfortunately we need a requires here due to OBS not installing 'recommended'
# packages :-(
Requires: xorg-x11-server-Xvfb
# PATCH-FEATURE-OPENSUSE n_xorg-x11-server-rpmmacros.patch dimstar@opensuse.org -- Provide RPM macros to require correct ABI Versions.
Patch1: N_default-module-path.diff
Patch2: N_zap_warning_xserver.diff
Patch3: N_driver-autoconfig.diff
Patch4: N_fix_fglrx_screendepth_issue.patch
Patch5: n_raise_default_clients.patch
Patch6: N_fix-dpi-values.diff
Patch7: N_Install-Avoid-failure-on-wrapper-installation.patch
Patch8: u_xorg-wrapper-Drop-supplemental-group-IDs.patch
Patch9: u_xorg-wrapper-build-Build-position-independent-code.patch
Patch10: u_xorg-wrapper-Xserver-Options-Whitelist-Filter.patch
Patch11: n_xorg-wrapper-rename-Xorg.patch
Patch12: n_xorg-wrapper-anybody.patch
Patch100: u_01-Improved-ConfineToShape.patch
Patch101: u_02-DIX-ConfineTo-Don-t-bother-about-the-bounding-box-when-grabbing-a-shaped-window.patch
Patch104: u_xorg-server-xdmcp.patch
Patch117: xorg-x11-server-byte-order.patch
Patch160: u_vesa-Add-VBEDPMSGetCapabilities-VBEDPMSGet.patch
Patch208: u_Panning-Set-panning-state-in-xf86RandR12ScreenSetSize.patch
Patch209: u_pci-primary-Fix-up-primary-PCI-device-detection-for-the-platfrom-bus.patch
Patch210: u_os-connections-Check-for-stale-FDs.patch
Patch215: u_Use-better-fallbacks-to-generate-cookies-if-arc4rand.patch
Patch1000: n_xserver-optimus-autoconfig-hack.patch
Patch1162: b_cache-xkbcomp-output-for-fast-start-up.patch
Patch1211: b_0001-Prevent-XSync-Alarms-from-senslessly-calling-CheckTr.patch
Patch1222: b_sync-fix.patch
Patch1401: u_randr-Do-not-crash-if-slave-screen-does-not-have-pro.patch
Patch1503: u_xfree86-Do-not-claim-pci-slots-if-fb-slot-is-already.patch
Patch1900: u_no-lto-for-tests.patch
Patch1910: u_modesetting-Fix-dirty-updates-for-sw-rotation.patch
Patch1920: u_xf86-Accept-devices-with-the-hyperv_drm-driver.patch
Patch1921: u_xf86-Accept-devices-with-the-kernels-ofdrm-driver.patch
Patch1930: u_xfree86-activate-GPU-screens-on-autobind.patch
Patch1960: u_sync-pci-ids-with-Mesa.patch
Patch1218176: u_miCloseScreen_check_for_null_pScreen_dev_private.patch
%description
This package contains the X.Org Server.
%package extra
Summary: Additional Xservers Xephyr, Xnest)
Group: System/X11/Servers/XF86_4
Requires: Mesa
Requires: xkbcomp
Requires: xkeyboard-config
Recommends: xorg-x11-fonts-core
Provides: xorg-x11-Xnest
Obsoletes: xorg-x11-Xnest
%description extra
This package contains additional Xservers (Xephyr, Xnest).
%package Xvfb
Summary: Virtual Xserver Xvfb
Group: System/X11/Servers/XF86_4
Requires: Mesa
Requires: xkbcomp
# Xvfb requires keyboard files as well (bnc#797124)
Requires: xkeyboard-config
Recommends: xorg-x11-fonts-core
Provides: xorg-x11-Xvfb
Provides: xorg-x11-server:/usr/bin/Xvfb
Obsoletes: xorg-x11-Xvfb
%description Xvfb
This package contains the virtual Xserver Xvfb.
%if 0%{?have_wayland} == 1
%package wayland
Summary: Xwayland Xserver
Group: System/X11/Servers/XF86_4
Requires: xkbcomp
Requires: xkeyboard-config
Recommends: xorg-x11-fonts-core
%description wayland
This package contains the Xserver running on the Wayland Display Server.
%endif
%if 0%{?build_suid_wrapper} == 1
%package wrapper
Summary: Xserver SUID Wrapper
Group: System/X11/Servers/XF86_4
PreReq: permissions
Requires: xorg-x11-server == %{version}
%description wrapper
This package contains an SUID wrapper for the Xserver.
%endif
%package sdk
Summary: X
Group: System/Libraries
Requires: autoconf
Requires: automake
Requires: c_compiler
Requires: libtool
Requires: xorg-x11-server
Requires: pkgconfig(fontconfig)
Requires: pkgconfig(fontenc)
Requires: pkgconfig(freetype2)
Requires: pkgconfig(ice)
Requires: pkgconfig(libdrm)
Requires: pkgconfig(libevdev)
Requires: pkgconfig(libudev)
Requires: pkgconfig(mtdev)
Requires: pkgconfig(sm)
Requires: pkgconfig(x11)
Requires: pkgconfig(xau)
Requires: pkgconfig(xdmcp)
Requires: pkgconfig(xext)
Requires: pkgconfig(xfixes)
Requires: pkgconfig(xkbfile)
Requires: pkgconfig(xmu)
Requires: pkgconfig(xorg-macros)
Requires: pkgconfig(xpm)
Requires: pkgconfig(xrender)
Requires: pkgconfig(xt)
Requires: pkgconfig(xtrans)
Requires: pkgconfig(xv)
Provides: xorg-x11-sdk
Obsoletes: xorg-x11-sdk
Provides: glamor-devel = %{version}
Obsoletes: glamor-devel < %{version}
Obsoletes: glamor-devel < 7.6_%{version}
Provides: xorg-x11-server-sdk = 7.6_%{version}
Obsoletes: xorg-x11-server-sdk < 7.6_%{version}
%description sdk
This package contains the X.Org Server SDK.
%package source
Summary: Source code of X.Org server
Group: Development/Sources
%description source
This package contains patched sources of X.Org Server.
%prep
%setup -q -n xorg-server-%{version} -a3
# Early verification if the ABI Defines are correct. Let's not waste build cycles if the Provides are wrong at the end.
sh %{SOURCE92} --verify . %{SOURCE91}
%if 0%{?suse_version} < 1315
%patch1
%endif
%patch2 -p1
%patch3 -p0
%patch4 -p0
%patch5 -p1
%patch6 -p0
%patch7 -p1
%patch8 -p1
%patch9 -p1
%patch10 -p1
%patch11 -p1
%patch12 -p1
#
%patch100 -p1
#%patch101 -p1
%patch104 -p1
%patch117 -p1
%patch160 -p1
%patch208 -p1
%patch209 -p1
### not applicable anymore
#%patch210 -p1
%patch215 -p1
### apparently supersed by upstream
### commit 078277e4d92f05a90c4715d61b89b9d9d38d68ea
### Author: Dave Airlie <airlied@redhat.com>
### Date: Fri Aug 17 09:49:24 2012 +1000
###
### xf86: autobind GPUs to the screen
#%patch1000 -p1
### disabled for now
#%patch1162 -p1
### disabled for now
#%patch1211 -p1
### patch222 might not be applicable anymore
#%patch1222 -p1
%patch1401 -p1
%patch1503 -p1
%patch1900 -p1
%patch1910 -p1
%patch1920 -p1
%patch1921 -p1
%patch1930 -p1
%patch1960 -p1
%patch1218176 -p1
%build
# We have some -z now related errors during X default startup (boo#1197994):
# - when loading modesetting: gbm_bo_get_plane_count
# - when loading fbdev: fbdevHWSave
# - when loading vesa: VBESetModeParameters
# this is directly visible on startup, so easy to test later on.
export SUSE_ZNOW=0
%global _lto_cflags %{?_lto_cflags} -ffat-lto-objects
test -e source-file-list || \
find -L . -type f \! -name '*.orig' \! -path ./source-file-list > \
source-file-list
autoreconf -fi
%if 0%{?pci_ids_dir:1}
export PCI_TXT_IDS_DIR=%{pci_ids_dir}
%endif
%configure CFLAGS="%{optflags} -fno-strict-aliasing" \
--enable-xf86vidmode \
--enable-xdmcp \
--enable-xdm-auth-1 \
--enable-dri \
--enable-dri2 \
--enable-dri3 \
--enable-glamor \
--enable-xnest \
--enable-kdrive \
--enable-kdrive-evdev \
--enable-xephyr \
--disable-xfake \
--disable-xfbdev \
--enable-record \
--enable-xcsecurity \
--enable-systemd-logind \
--with-sha1=libcrypto \
--disable-linux-acpi \
--disable-linux-apm \
--enable-xorg \
%if 0%{?suse_version} > 1120
--enable-config-udev \
%endif
%if 0%{?have_wayland} == 1
--enable-xwayland \
%else
--disable-xwayland \
%endif
%if 0%{?build_suid_wrapper} == 1
--enable-suid-wrapper \
--libexecdir=%{suid_wrapper_dir} \
%endif
--with-log-dir="/var/log" \
--with-os-name="openSUSE" \
--with-os-vendor="SUSE LINUX" \
--with-fontrootdir="/usr/share/fonts" \
--with-xkb-path="/usr/share/X11/xkb" \
--with-xkb-output="/var/lib/xkb/compiled" \
--with-default-font-path="/usr/share/fonts/misc:unscaled,\
/usr/share/fonts/Type1/,/usr/share/fonts/100dpi:unscaled,\
%if 0%{?suse_version} > 1210
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/ghostscript/,\
%else
/usr/share/fonts/75dpi:unscaled,/usr/share/fonts/URW/,\
%endif
/usr/share/fonts/cyrillic:unscaled,\
/usr/share/fonts/misc/sgi:unscaled,\
/usr/share/fonts/truetype/,built-ins"
make %{?_smp_mflags} V=1
make -C hw/kdrive %{?_smp_mflags}
%install
%make_install
make -C hw/kdrive install DESTDIR=%{buildroot}
# remove .la files
find %{buildroot}%{_libdir}/xorg/modules/ -name "*.la" | \
xargs rm
install -m 644 hw/xfree86/parser/{xf86Parser.h,xf86Optrec.h} \
%{buildroot}%{_includedir}/xorg
# bnc #632737
chmod u-s %{buildroot}%{_bindir}/Xorg
%if 0%{?pci_ids_dir:1}
%__mkdir_p %{buildroot}%{pci_ids_dir}
install -m 644 %{S:6} %{buildroot}%{pci_ids_dir}
%endif
%if 0%{?build_suid_wrapper} == 1
mv %{buildroot}%{_bindir}/Xorg \
%{buildroot}%{_bindir}/Xorg.bin
mv %{buildroot}%{_bindir}/Xorg.sh \
%{buildroot}%{_bindir}/Xorg
%endif
ln -snf Xorg %{buildroot}%{_bindir}/X
%if 0%{?suse_version} > 1120
%{__install} -m 644 %{S:5} %{buildroot}%{_datadir}/X11/xorg.conf.d
%endif
%if 0%{?suse_version} < 1315
mkdir -p %{buildroot}%{_libdir}/xorg/modules/updates/{fonts,input,linux,drivers,multimedia,extensions}
install -m 644 $RPM_SOURCE_DIR/README.updates %{buildroot}%{_libdir}/xorg/modules/updates
%endif
# FATE#325524
mkdir -p %{buildroot}%{_datadir}/factory/%{_localstatedir}/lib/xkb/compiled
mv %{buildroot}%{_localstatedir}/lib/xkb/compiled/README.compiled %{buildroot}%{_datadir}/factory/%{_localstatedir}/lib/xkb/compiled/
mkdir -p %{buildroot}%{_tmpfilesdir}
install -m 644 %{S:7} %{buildroot}%{_tmpfilesdir}/xkb.conf
mkdir -p %{buildroot}%{_fillupdir}
install -m 644 %_sourcedir/sysconfig.displaymanager.template \
%{buildroot}%{_fillupdir}/sysconfig.displaymanager-%{name}
install -m 755 $RPM_SOURCE_DIR/xorg-backtrace %{buildroot}%{_bindir}/xorg-backtrace
cp %{S:90} .
./config.status --file xorg-x11-server.macros
install -D xorg-x11-server.macros %{buildroot}/usr/lib/rpm/macros.d/macros.xorg-server
%if 0%{?suse_version} >= 1315
mkdir -p %{buildroot}%{_libdir}/xorg/modules/extensions/xorg
mv %{buildroot}%{_libdir}/xorg/modules/extensions/libglx.so \
%{buildroot}%{_libdir}/xorg/modules/extensions/xorg/xorg-libglx.so
ln -snf %{_sysconfdir}/alternatives/libglx.so %{buildroot}%{_libdir}/xorg/modules/extensions/libglx.so
%endif
mkdir -p %{buildroot}/usr/src/xserver
xargs cp --parents --target-directory=%{buildroot}/usr/src/xserver < source-file-list
# unneeded python2 script; simply remove it (boo#1179591)
rm -f %{buildroot}/usr/src/xserver/config/fdi2iclass.py
%post
%tmpfiles_create xkb.conf
%{fillup_only -an displaymanager}
# Move SaX2 generated xorg.conf file to xorg.conf.sle11
#
# Only in very rare cases a static X configuration is still
# required on sle12. And, in some cases the migration from a
# static sle11 X configuration to a static sle12 X configuration
# is not possible at all, e.g. some video and input drivers
# are no longer available on sle12. In short, trying to migrate
# will result in more harm than benefit.
if [ -f etc/X11/xorg.conf -a ! -f etc/X11/xorg.conf.sle11 ]; then
echo "xorg.conf exists and xorg.conf.sle11 does not"
if grep -q "SaX generated X11 config file" etc/X11/xorg.conf; then
echo "move SaX generated xorg.conf to xorg.conf.sle11"
mv etc/X11/xorg.conf etc/X11/xorg.conf.sle11
# remove dangling link (bnc#879360, comment#15)
rm -f etc/X11/XF86Config
# prevent %postun of NVIDIA/fglrx driver packages from restoring xorg.conf
# backup or running sax2 as fallback to create a new xorg.conf (bcn#877315)
rm -f etc/X11/xorg.conf.nvidia-post \
etc/X11/xorg.conf.fglrx-post
chmod -x usr/sbin/sax2
fi
fi
%if 0%{?suse_version} >= 1315
%_sbindir/update-alternatives \
--force --install %{_libdir}/xorg/modules/extensions/libglx.so libglx.so %{_libdir}/xorg/modules/extensions/xorg/xorg-libglx.so 50
%endif
exit 0
%if 0%{?suse_version} >= 1315
%postun
if [ "$1" = 0 ] ; then
"%_sbindir/update-alternatives" --remove libglx.so %{_libdir}/xorg/modules/extensions/xorg/xorg-libglx.so
fi
%endif
%if 0%{?build_suid_wrapper} == 1
%post wrapper
%set_permissions %{suid_wrapper_dir}/Xorg.wrap
%verifyscript wrapper
%verify_permissions -e %{suid_wrapper_dir}/Xorg.wrap
%endif
%files
%defattr(-,root,root)
%if 0%{?suse_version} > 1120
%if 0%{?pci_ids_dir:1}
%dir %{pci_ids_dir}
%{pci_ids_dir}/modesetting.ids
%endif
%dir %{_datadir}/X11/xorg.conf.d
%{_datadir}/X11/xorg.conf.d/*.conf
%endif
%{_tmpfilesdir}/xkb.conf
%dir %{_localstatedir}/lib/xkb
%dir %{_localstatedir}/lib/xkb/compiled
%dir %{_libdir}/xorg
%{_libdir}/xorg/protocol.txt
%{_mandir}/man1/*
%exclude %{_mandir}/man1/Xephyr.1*
%exclude %{_mandir}/man1/Xnest.1*
%dir %{_datadir}/factory
%dir %{_datadir}/factory/var
%dir %{_datadir}/factory/var/lib
%dir %{_datadir}/factory/var/lib/xkb
%dir %{_datadir}/factory/var/lib/xkb/compiled
%{_datadir}/factory/%{_localstatedir}/lib/xkb/compiled/README.compiled
%{_bindir}/Xorg
%if 0%{?build_suid_wrapper} == 1
%{_bindir}/Xorg.bin
%endif
%{_bindir}/X
%{_bindir}/gtf
%{_libdir}/xorg/modules/
%{_mandir}/man4/*
%{_mandir}/man5/*
%{_fillupdir}/sysconfig.displaymanager-%{name}
%if 0%{?suse_version} >= 1315
%ghost %{_sysconfdir}/alternatives/libglx.so
%endif
%{_bindir}/xorg-backtrace
%if 0%{?have_wayland} == 1
%files wayland
%{_bindir}/Xwayland
%endif
%if 0%{?build_suid_wrapper} == 1
%files wrapper
%defattr(-,root,root)
%attr(4755,root,root) %{suid_wrapper_dir}/Xorg.wrap
%endif
%files extra
%defattr(-,root,root)
%{_bindir}/Xephyr
%{_bindir}/Xnest
%{_mandir}/man1/Xephyr.1*
%{_mandir}/man1/Xnest.1*
%files Xvfb
%defattr(-,root,root)
%{_bindir}/Xvfb
%files sdk
%defattr(-,root,root)
%{_includedir}/xorg/
%{_libdir}/pkgconfig/*.pc
%{_datadir}/aclocal/*.m4
/usr/lib/rpm/macros.d/macros.xorg-server
%files source
%defattr(-,root,root)
/usr/src/xserver
%changelog

BIN
xorgcfg.tar.bz2 (Stored with Git LFS) Normal file

Binary file not shown.