update to xserver 21.1.12

This commit is contained in:
purplerain 2024-04-09 08:46:18 +00:00
parent c5d87f442b
commit f0fd08c832
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
59 changed files with 449 additions and 209 deletions

View file

@ -2,7 +2,7 @@
// Default modes distilled from
// "VESA and Industry Standards and Guide for Computer Display Monitor
// Timing", version 1.0, revision 0.8, adopted September 17, 1998.
//
//
// $XFree86: xc/programs/Xserver/hw/xfree86/etc/vesamodes,v 1.3 1999/11/16 03:28:03 tsi Exp $

View file

@ -646,6 +646,7 @@ typedef enum {
FLAG_MAX_CLIENTS,
FLAG_IGLX,
FLAG_DEBUG,
FLAG_ALLOW_BYTE_SWAPPED_CLIENTS,
} FlagValues;
/**
@ -705,6 +706,8 @@ static OptionInfoRec FlagOptions[] = {
{0}, FALSE},
{FLAG_DEBUG, "Debug", OPTV_STRING,
{0}, FALSE},
{FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, "AllowByteSwappedClients", OPTV_BOOLEAN,
{0}, FALSE},
{-1, NULL, OPTV_NONE,
{0}, FALSE},
};
@ -746,6 +749,14 @@ configServerFlags(XF86ConfFlagsPtr flagsconf, XF86OptionPtr layoutopts)
xf86Msg(X_CONFIG, "Ignoring ABI Version\n");
}
xf86GetOptValBool(FlagOptions, FLAG_ALLOW_BYTE_SWAPPED_CLIENTS, &AllowByteSwappedClients);
if (AllowByteSwappedClients) {
xf86Msg(X_CONFIG, "Allowing byte-swapped clients\n");
}
else {
xf86Msg(X_CONFIG, "Prohibiting byte-swapped clients\n");
}
if (xf86IsOptionSet(FlagOptions, FLAG_AUTO_ADD_DEVICES)) {
xf86GetOptValBool(FlagOptions, FLAG_AUTO_ADD_DEVICES,
&xf86Info.autoAddDevices);

View file

@ -112,7 +112,7 @@ static Bool formatsDone = FALSE;
#ifdef X_PRIVSEP
static Bool xf86KeepPriv = FALSE;
#endif
#endif
static void

View file

@ -507,6 +507,8 @@ xf86LookupMode(ScrnInfoPtr scrp, DisplayModePtr modep,
/* scan through the modes in the sort order above */
if ((p->type & type) != type)
continue;
if (p->name == NULL)
continue;
if (strcmp(p->name, modep->name) == 0) {

View file

@ -2123,7 +2123,7 @@ CloseScreen(ScreenPtr pScreen)
dixLookupPrivate(&pScreen->devPrivates, miPointerScreenKey);
if (PointPriv->spriteFuncs == &drmmode_sprite_funcs)
PointPriv->spriteFuncs = ms->SpriteFuncs;
PointPriv->spriteFuncs = ms->SpriteFuncs;
}
if (pScrn->vtSema) {

View file

@ -4097,7 +4097,7 @@ drmmode_handle_uevents(int fd, void *closure)
struct udev_device *dev;
Bool found = FALSE;
#ifdef CONFIG_UDEV_KMS
#ifdef CONFIG_UDEV_KMS
while ((dev = udev_monitor_receive_device(drmmode->uevent_monitor))) {
udev_device_unref(dev);
found = TRUE;
@ -4146,7 +4146,7 @@ drmmode_uevent_init(ScrnInfoPtr scrn, drmmode_ptr drmmode)
drmmode_handle_uevents, drmmode);
drmmode->uevent_monitor = mon;
#elif CONFIG_KEVENT_KMS
#elif CONFIG_KEVENT_KMS
int kq;
struct kevent ev;

View file

@ -677,6 +677,9 @@ Possible values are
or
.BR sync .
Unset by default.
.TP 7
.BI "Option \*qAllowByteSwappedClients\*q \*q" boolean \*q
Allow clients with a different byte-order than the server. Enabled by default.
.SH "MODULE SECTION"
The
.B Module

View file

@ -840,7 +840,7 @@ xf86CompatOutput(ScrnInfoPtr pScrn)
xf86CrtcConfigPtr config;
if (xf86CrtcConfigPrivateIndex == -1)
return NULL;
return NULL;
config = XF86_CRTC_CONFIG_PTR(pScrn);
if (config->compat_output < 0)
return NULL;

View file

@ -325,8 +325,8 @@ int (*xf86ReadMmio32) (void *Base, unsigned long Offset)
= readDense32;
/*
* Do all things that need root privileges early
* and revoke those priviledges
* Do all things that need root privileges early
* and revoke those priviledges
*/
_X_EXPORT void
xf86PrivilegedInit(void)

View file

@ -85,7 +85,7 @@ GARTInit(int screenNum)
return FALSE;
}
xf86ReleaseGART(-1);
return TRUE;
}

View file

@ -796,7 +796,7 @@ void
xf86DropPriv(void)
{
struct passwd *pw;
/* revoke privileges */
if (getuid() == 0) {
/* Running as root */
@ -807,7 +807,7 @@ xf86DropPriv(void)
if (ChownLock(pw->pw_uid, pw->pw_gid) == -1) {
FatalError("Chown Lock");
}
/* Start privileged child */
if (priv_init(pw->pw_uid, pw->pw_gid) == -1) {
FatalError("priv_init");

View file

@ -7,19 +7,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Rich Murphey and David Wexelblat
* not be used in advertising or publicity pertaining to distribution of
* documentation, and that the names of Rich Murphey and David Wexelblat
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
* David Wexelblat make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* David Wexelblat make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@ -57,7 +57,7 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
#ifdef X_PRIVSEP
/*
* Do all initialisation that need root privileges
* Do all initialisation that need root privileges
*/
void
xf86PrivilegedInit(void)

View file

@ -78,14 +78,14 @@ checkDevMem(Bool warn)
if (devMemChecked)
return;
devMemChecked = TRUE;
#ifdef HAS_APERTURE_DRV
/* Try the aperture driver first */
if ((fd = open(DEV_APERTURE, O_RDWR)) >= 0) {
/* Try to map a page at the VGA address */
base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000);
if (base != MAP_FAILED) {
munmap((caddr_t)base, 4096);
devMemFd = fd;
@ -106,7 +106,7 @@ checkDevMem(Bool warn)
/* Try to map a page at the VGA address */
base = mmap((caddr_t)0, 4096, PROT_READ | PROT_WRITE,
MAP_FLAGS, fd, (off_t)0xA0000);
if (base != MAP_FAILED) {
munmap((caddr_t)base, 4096);
devMemFd = fd;
@ -134,7 +134,7 @@ checkDevMem(Bool warn)
"\t(%s)\n%s", DEV_APERTURE, DEV_MEM, strerror(errno),
SYSCTL_MSG);
#endif /* __OpenBSD__ */
xf86ErrorF("\tlinear framebuffer access unavailable\n");
}
useDevMem = FALSE;
@ -228,13 +228,13 @@ xf86DisableIO()
{
if (!ExtendedEnabled)
return;
if (amd64_iopl(FALSE) == 0) {
ExtendedEnabled = FALSE;
}
/* Otherwise, the X server has revoqued its root uid,
and thus cannot give up IO privileges any more */
return;
}
@ -280,7 +280,7 @@ xf86SetTVOut(int mode)
switch (xf86Info.consType) {
#ifdef PCCONS_SUPPORT
case PCCONS:{
if (ioctl (xf86Info.consoleFd, CONSOLE_X_TV_ON, &mode) < 0) {
xf86Msg(X_WARNING,
"xf86SetTVOut: Could not set console to TV output, %s\n",
@ -303,7 +303,7 @@ xf86SetRGBOut()
switch (xf86Info.consType) {
#ifdef PCCONS_SUPPORT
case PCCONS:{
if (ioctl (xf86Info.consoleFd, CONSOLE_X_TV_OFF, 0) < 0) {
xf86Msg(X_WARNING,
"xf86SetTVOut: Could not set console to RGB output, %s\n",
@ -332,7 +332,7 @@ _X_EXPORT void
xf86PrivilegedInit(void)
{
checkDevMem(TRUE);
pci_system_init();
pci_legacy_open_io(NULL, 0, 64*1024);
ExtendedEnabled = TRUE; /* Will die with xf86EnableIO() */

View file

@ -6,19 +6,19 @@
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Rich Murphey and David Wexelblat
* not be used in advertising or publicity pertaining to distribution of
* documentation, and that the names of Rich Murphey and David Wexelblat
* not be used in advertising or publicity pertaining to distribution of
* the software without specific, written prior permission. Rich Murphey and
* David Wexelblat make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* David Wexelblat make no representations about the suitability of this
* software for any purpose. It is provided "as is" without express or
* implied warranty.
*
* RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* RICH MURPHEY AND DAVID WEXELBLAT DISCLAIM ALL WARRANTIES WITH REGARD TO
* THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
* FITNESS, IN NO EVENT SHALL RICH MURPHEY OR DAVID WEXELBLAT BE LIABLE FOR
* ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER
* RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF
* CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
* CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*
*/
@ -47,8 +47,8 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
#ifdef X_PRIVSEP
/*
* Do all things that need root privileges early
* and revoke those privileges
* Do all things that need root privileges early
* and revoke those privileges
*/
_X_EXPORT void
xf86PrivilegedInit(void)

View file

@ -48,8 +48,8 @@ xf86OSInitVidMem(VidMemInfoPtr pVidMem)
#ifdef X_PRIVSEP
/*
* Do all things that need root privileges early
* and revoke those privileges
* Do all things that need root privileges early
* and revoke those privileges
*/
_X_EXPORT void
xf86PrivilegedInit(void)

View file

@ -103,12 +103,12 @@ elif host_machine.system().endswith('bsd')
srcs_xorg_os_support += 'bsd/i386_video.c'
if host_machine.system() == 'netbsd'
os_dep += cc.find_library('x86_64')
elif host_machine.system() == 'openbsd'
elif host_machine.system() == 'secbsd'
os_dep += cc.find_library('amd64')
endif
elif host_machine.cpu_family() == 'x86'
srcs_xorg_os_support += 'bsd/i386_video.c'
if host_machine.system() == 'netbsd' or host_machine.system() == 'openbsd'
if host_machine.system() == 'netbsd' or host_machine.system() == 'secbsd'
os_dep += cc.find_library('i386')
endif
elif host_machine.cpu_family() == 'arm'

View file

@ -272,6 +272,7 @@ ProcAppleDRICreatePixmap(ClientPtr client)
xAppleDRICreatePixmapReply rep;
int width, height, pitch, bpp;
void *ptr;
CARD32 stringLength;
REQUEST_SIZE_MATCH(xAppleDRICreatePixmapReq);
@ -307,6 +308,7 @@ ProcAppleDRICreatePixmap(ClientPtr client)
if (sizeof(rep) != sz_xAppleDRICreatePixmapReply)
ErrorF("error sizeof(rep) is %zu\n", sizeof(rep));
stringLength = rep.stringLength; /* save unswapped value */
if (client->swapped) {
swaps(&rep.sequenceNumber);
swapl(&rep.length);
@ -319,7 +321,7 @@ ProcAppleDRICreatePixmap(ClientPtr client)
}
WriteToClient(client, sizeof(rep), &rep);
WriteToClient(client, rep.stringLength, path);
WriteToClient(client, stringLength, path);
return Success;
}

View file

@ -25,7 +25,7 @@
*or other dealings in this Software without prior written authorization
*from the XFree86 Project.
*
* Authors: Alexander Gottwald
* Authors: Alexander Gottwald
*/
#ifdef HAVE_XWIN_CONFIG_H

View file

@ -27,7 +27,7 @@
*or other dealings in this Software without prior written authorization
*from the XFree86 Project.
*
* Authors: Alexander Gottwald
* Authors: Alexander Gottwald
*/
#include "win.h"

View file

@ -25,7 +25,7 @@
*or other dealings in this Software without prior written authorization
*from the XFree86 Project.
*
* Authors: Alexander Gottwald
* Authors: Alexander Gottwald
*/
#ifdef HAVE_XWIN_CONFIG_H

View file

@ -25,7 +25,7 @@
*or other dealings in this Software without prior written authorization
*from the XFree86 Project.
*
* Authors: Alexander Gottwald
* Authors: Alexander Gottwald
*/
#ifndef __WIN_MSG_H__

View file

@ -118,7 +118,7 @@ parse_file (FILE *file)
if (!file)
return 1;
yylineno = 1;
yyin = file;
ret = yyparse ();

View file

@ -51,7 +51,7 @@
/* The global pref settings */
WINPREFS pref;
/* The working menu */
/* The working menu */
static MENUPARSED menu;
/* Functions for parsing the tokens into out structure */
@ -139,7 +139,7 @@ line: NEWLINE
;
newline_or_nada:
newline_or_nada:
| NEWLINE newline_or_nada
;
@ -335,19 +335,19 @@ CloseMenu (void)
ErrorF("LoadPreferences: Empty menu detected\n");
return;
}
if (pref.menuItems)
pref.menu = realloc (pref.menu, (pref.menuItems+1)*sizeof(MENUPARSED));
else
pref.menu = malloc (sizeof(MENUPARSED));
memcpy (pref.menu+pref.menuItems, &menu, sizeof(MENUPARSED));
pref.menuItems++;
memset (&menu, 0, sizeof(MENUPARSED));
}
static void
static void
OpenIcons (void)
{
if (pref.icon != NULL) {
@ -377,7 +377,7 @@ AddIconLine (char *matchstr, char *iconfile)
pref.iconItems++;
}
static void
static void
CloseIcons (void)
{
}